diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 8787bdfe..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/yoshi-java is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/yoshi-java -**/*.java @googleapis/yoshi-java - -# The java-samples-reviewers team is the default owner for samples changes -samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index b9380e25..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. dataproc 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 39883260..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,7 +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 # ☕️ diff --git a/.github/readme/synth.py b/.github/readme/synth.py deleted file mode 100644 index 7b48cc28..00000000 --- a/.github/readme/synth.py +++ /dev/null @@ -1,19 +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 script is used to synthesize generated the README for this library.""" - -from synthtool.languages import java - -java.custom_templates(["java_library/README.md"]) diff --git a/.github/release-please.yml b/.github/release-please.yml index dce2c845..7bf58076 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,8 @@ +bumpMinorPreMajor: true +handleGHRelease: true releaseType: java-yoshi -bumpMinorPreMajor: true \ No newline at end of file +branches: + - bumpMinorPreMajor: true + handleGHRelease: true + releaseType: java-yoshi + branch: java7 diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml new file mode 100644 index 00000000..67c70eb2 --- /dev/null +++ b/.github/release-trigger.yml @@ -0,0 +1,2 @@ +enabled: true +multiScmName: java-dataproc diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 6bddd18e..00000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,49 +0,0 @@ - -# Whether or not rebase-merging is enabled on this repository. -# Defaults to `true` -rebaseMergeAllowed: false - -# Whether or not squash-merging is enabled on this repository. -# Defaults to `true` -squashMergeAllowed: true - -# Whether or not PRs are merged with a merge commit on this repository. -# Defaults to `false` -mergeCommitAllowed: false - -# Rules for master branch protection -branchProtectionRules: -# Identifies the protection rule pattern. Name of the branch to be protected. -# Defaults to `master` -- pattern: master - # Can admins overwrite branch protection. - # Defaults to `true` - isAdminEnforced: true - # Number of approving reviews required to update matching branches. - # Defaults to `1` - requiredApprovingReviewCount: 1 - # Are reviews from code owners required to update matching branches. - # Defaults to `false` - requiresCodeOwnerReviews: true - # Require up to date branches - requiresStrictStatusChecks: false - # List of required status check contexts that must pass for commits to be accepted to matching branches. - requiredStatusCheckContexts: - - "dependencies (8)" - - "dependencies (11)" - - "linkage-monitor" - - "lint" - - "clirr" - - "units (7)" - - "units (8)" - - "units (11)" - - "Kokoro - Test: Integration" - - "cla/google" -# List of explicit permissions to add (additive only) -permissionRules: -- team: yoshi-admins - permission: admin -- team: yoshi-java-admins - permission: admin -- team: yoshi-java - permission: push \ No newline at end of file diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml deleted file mode 100644 index f247d5c7..00000000 --- a/.github/trusted-contribution.yml +++ /dev/null @@ -1,2 +0,0 @@ -trustedContributors: -- renovate-bot \ No newline at end of file diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml deleted file mode 100644 index bc1554ae..00000000 --- a/.github/workflows/auto-release.yaml +++ /dev/null @@ -1,88 +0,0 @@ -on: - pull_request: -name: auto-release -jobs: - approve: - runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-v') - steps: - - uses: actions/github-script@v3.0.0 - with: - github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} - debug: true - script: | - // only approve PRs from release-please[bot] - if (context.payload.pull_request.user.login !== "release-please[bot]") { - return; - } - - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { - return; - } - - // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.pulls.listFiles.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }); - const changed_files = await github.paginate(filesPromise) - - if ( changed_files.length < 1 ) { - console.log( "Not proceeding since PR is empty!" ) - return; - } - - if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { - console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) - return; - } - - // trigger auto-release when - // 1) it is a SNAPSHOT release (auto-generated post regular release) - // 2) there are dependency updates only - // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) - if ( - context.payload.pull_request.body.includes("Fix") || - context.payload.pull_request.body.includes("Build") || - context.payload.pull_request.body.includes("Documentation") || - context.payload.pull_request.body.includes("BREAKING CHANGES") || - context.payload.pull_request.body.includes("Features") - ) { - console.log( "Not auto-releasing since it is not a dependency-update-only release." ); - return; - } - - const promise = github.pulls.list.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open' - }); - const open_pulls = await github.paginate(promise) - - if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { - for ( const pull of open_pulls ) { - if ( pull.title.startsWith("deps: update dependency") ) { - console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); - return; - } - } - } - - // approve release PR - await github.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Rubber stamped release!', - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }); - - // attach kokoro:force-run and automerge labels - await github.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ['kokoro:force-run', 'automerge'] - }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 68302207..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,79 +0,0 @@ -on: - push: - branches: - - master - pull_request: -name: ci -jobs: - units: - runs-on: ubuntu-latest - strategy: - matrix: - java: [7, 8, 11] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test - - name: coverage - uses: codecov/codecov-action@v1 - with: - name: actions ${{matrix.java}} - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - run: .kokoro/build.bat - env: - JOB_TYPE: test - dependencies: - runs-on: ubuntu-latest - strategy: - matrix: - java: [8, 11] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/dependencies.sh - linkage-monitor: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - run: .kokoro/linkage-monitor.sh - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: lint - clirr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 8 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: clirr \ No newline at end of file diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml deleted file mode 100644 index c46230a7..00000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,14 +0,0 @@ -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 05826ad9..00000000 --- a/.kokoro/build.bat +++ /dev/null @@ -1,3 +0,0 @@ -:: See documentation in type-shell-output.bat - -"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh deleted file mode 100755 index 8fadeee1..00000000 --- a/.kokoro/build.sh +++ /dev/null @@ -1,111 +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 Java version -java -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 \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C - -# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it -if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then - export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) -fi - -RETURN_CODE=0 -set +e - -case ${JOB_TYPE} in -test) - mvn test -B -Dclirr.skip=true -Denforcer.skip=true - RETURN_CODE=$? - ;; -lint) - mvn com.coveo:fmt-maven-plugin:check - RETURN_CODE=$? - ;; -javadoc) - mvn javadoc:javadoc javadoc:test-javadoc - RETURN_CODE=$? - ;; -integration) - mvn -B ${INTEGRATION_TEST_ARGS} \ - -Penable-integration-tests \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - ;; -samples) - if [[ -f samples/pom.xml ]] - then - pushd samples - mvn -B \ - -Penable-samples \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - popd - else - echo "no sample pom.xml found - skipping sample tests" - fi - ;; -clirr) - mvn -B -Denforcer.skip=true clirr:check - RETURN_CODE=$? - ;; -*) - ;; -esac - -if [ "${REPORT_COVERAGE}" == "true" ] -then - bash ${KOKORO_GFILE_DIR}/codecov.sh -fi - -# fix output location of logs -bash .kokoro/coerce_logs.sh - -if [[ "${ENABLE_BUILD_COP}" == "true" ]] -then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop - ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -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 5cf7ba49..00000000 --- a/.kokoro/coerce_logs.sh +++ /dev/null @@ -1,38 +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 - echo "processing ${xml}" - 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 a8d0ea04..00000000 --- a/.kokoro/common.sh +++ /dev/null @@ -1,59 +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 - echo "${command}" - ${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/continuous/readme.cfg b/.kokoro/continuous/readme.cfg deleted file mode 100644 index 771dba28..00000000 --- a/.kokoro/continuous/readme.cfg +++ /dev/null @@ -1,55 +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. - -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-dataproc/.kokoro/readme.sh" -} - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.log" - } -} - -# The github token is stored here. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "yoshi-automation-github-key" - # TODO(theacodes): remove this after secrets have globally propagated - backend_type: FASTCONFIGPUSH - } - } -} - -# Common env vars for all repositories and builds. -env_vars: { - key: "GITHUB_USER" - value: "yoshi-automation" -} -env_vars: { - key: "GITHUB_EMAIL" - value: "yoshi-automation@google.com" -} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh deleted file mode 100755 index c91e5a56..00000000 --- a/.kokoro/dependencies.sh +++ /dev/null @@ -1,89 +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 Java -java -version -echo $JOB_TYPE - -export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" - -# this should run maven enforcer -retry_with_backoff 3 10 \ - mvn install -B -V \ - -DskipTests=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/\\s--\\smodule.*// >.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 $(find -name ".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 \ No newline at end of file diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh deleted file mode 100755 index 759ab4e2..00000000 --- a/.kokoro/linkage-monitor.sh +++ /dev/null @@ -1,46 +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 -# Display commands being run. -set -x - -## 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 version -java -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 \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true - -# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR -JAR=linkage-monitor-latest-all-deps.jar -curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" - -# Fails if there's new linkage errors compared with baseline -java -jar ${JAR} com.google.cloud:libraries-bom 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 0048c8ec..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_BUILD_COP" - value: "true" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg 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 f2542931..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_BUILD_COP" - 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/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 100644 index 0ffc3b78..00000000 --- a/.kokoro/readme.sh +++ /dev/null @@ -1,36 +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 -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" \ No newline at end of file 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 6e3f6599..00000000 --- a/.kokoro/release/common.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# Get secrets from keystore and set and environment variables -setup_environment_secrets() { - export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) - export GPG_TTY=$(tty) - export GPG_HOMEDIR=/gpg - mkdir $GPG_HOMEDIR - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg - export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') - export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') -} - -create_settings_xml_file() { - echo " - - - ossrh - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-staging - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-snapshots - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - -" > $1 -} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg 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 5c4551ef..00000000 --- a/.kokoro/release/drop.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:drop -B \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg 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 1fa95fa5..00000000 --- a/.kokoro/release/promote.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh - -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:release -B \ - -DperformRelease=true \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg deleted file mode 100644 index 29addf3a..00000000 --- a/.kokoro/release/publish_javadoc.cfg +++ /dev/null @@ -1,29 +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: "STAGING_BUCKET_V2" - value: "docs-staging-v2-staging" - # Production will be at: docs-staging-v2 -} - -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 a967b79a..00000000 --- a/.kokoro/release/publish_javadoc.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET}" ]]; then - echo "Need to set STAGING_BUCKET environment variable" - exit 1 -fi - -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 - -NAME=google-cloud-dataproc -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} - -popd - -# V2 -mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" - -pushd target/devsite - -# 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_V2} 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 098168a7..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 install 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 3c482cbc..00000000 --- a/.kokoro/release/stage.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# Start the releasetool reporter -python3 -m pip install gcp-releasetool -python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script - -source $(dirname "$0")/common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn clean install 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 9da0f839..00000000 --- a/.kokoro/trampoline.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -set -eo pipefail -# Always run the cleanup script, regardless of the success of bouncing into -# the container. -function cleanup() { - chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - echo "cleanup"; -} -trap cleanup EXIT - -$(dirname $0)/populate-secrets.sh # Secret Manager secrets. -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json deleted file mode 100644 index 44da75c9..00000000 --- a/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "dataproc", - "name_pretty": "Dataproc", - "product_documentation": "https://cloud.google.com/dataproc", - "client_documentation": "https://googleapis.dev/java/google-cloud-dataproc/latest/", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559745", - "release_level": "ga", - "language": "java", - "repo": "googleapis/java-dataproc", - "repo_short": "java-dataproc", - "distribution_name": "com.google.cloud:google-cloud-dataproc", - "codeowner_team": "@googleapis/yoshi-java", - "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." -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 78b5c1e7..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,182 +0,0 @@ -# Changelog - -### [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/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 6b2238bb..2add2547 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,4 @@ + # Code of Conduct ## Our Pledge @@ -69,12 +70,12 @@ dispute. If you are unable to resolve the matter for any reason, or if the behavior is threatening or harassing, report it. We are dedicated to providing an environment where participants feel welcome and safe. -Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the -Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to receive and address reported violations of the code of conduct. They will then work with a committee consisting of representatives from the Open Source Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out the Project Steward, please email +are uncomfortable reaching out to the Project Steward, please email opensource@google.com. We will investigate every complaint, but you may not receive a direct response. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee0..b65dd279 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify ## Code Samples -Code Samples must be bundled in separate Maven modules, and guarded by a -Maven profile with the name `enable-samples`. +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. The samples must be separate from the primary project for a few reasons: -1. Primary projects have a minimum Java version of Java 7 whereas samples have - a minimum Java version of Java 8. Due to this we need the ability to +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. @@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons: ### Building ```bash -mvn -Penable-samples clean verify +mvn clean verify ``` Some samples require access to GCP services and require a service account: ```bash export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json -mvn -Penable-samples clean verify +mvn clean verify ``` -### Profile Config - -1. To add samples in a profile to your Maven project, add the following to your -`pom.xml` - - ```xml - - [...] - - - enable-samples - - sample - - - - [...] - - ``` - -2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory. - ### Code Formatting Code in this repo is formatted with @@ -110,30 +87,6 @@ To run formatting on your project, you can run: mvn com.coveo:fmt-maven-plugin:format ``` -### Profile Activation - -To include code samples when building and testing the project, enable the -`enable-samples` Maven profile. - -#### Command line - -To activate the Maven profile on the command line add `-Penable-samples` to your -Maven command. - -#### Maven `settings.xml` - -To activate the Maven profile in your `~/.m2/settings.xml` add an entry of -`enable-samples` following the instructions in [Active Profiles][2]. - -This method has the benefit of applying to all projects you build (and is -respected by IntelliJ IDEA) and is recommended if you are going to be -contributing samples to several projects. - -#### IntelliJ IDEA - -To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in -[Activate Maven profiles][3] to activate `enable-samples`. - [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file diff --git a/LICENSE b/LICENSE index d6456956..261eeb9e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/README.md b/README.md index 163815fd..e124cb08 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,25 @@ Java idiomatic client for [Dataproc][product-docs]. - [Product Documentation][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 com.google.cloud libraries-bom - 10.1.0 + 26.1.3 pom import @@ -35,31 +44,43 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file If you are using Maven without BOM, add this to your dependencies: + ```xml com.google.cloud google-cloud-dataproc - 1.1.0 + 4.0.8 ``` -[//]: # ({x-version-update-start:google-cloud-dataproc:released}) +If you are using Gradle 5.x or later, add this to your dependencies: + +```Groovy +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, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-dataproc:1.1.1' +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" % "1.1.1" +libraryDependencies += "com.google.cloud" % "google-cloud-dataproc" % "4.2.0" ``` -[//]: # ({x-version-update-end}) ## Authentication See the [Authentication][authentication] section in the base directory's README. +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Dataproc APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Dataproc API calls. + ## Getting Started ### Prerequisites @@ -89,17 +110,16 @@ use this Dataproc Client Library. ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/java-dataproc/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/java-dataproc/tree/main/samples) directory. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Create Cluster | [source code](https://github.com/googleapis/java-dataproc/blob/master/samples/snippets/src/main/java/CreateCluster.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/CreateCluster.java) | -| Create Cluster With Autoscaling | [source code](https://github.com/googleapis/java-dataproc/blob/master/samples/snippets/src/main/java/CreateClusterWithAutoscaling.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/CreateClusterWithAutoscaling.java) | -| Instantiate Inline Workflow Template | [source code](https://github.com/googleapis/java-dataproc/blob/master/samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java) | -| Quickstart | [source code](https://github.com/googleapis/java-dataproc/blob/master/samples/snippets/src/main/java/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/Quickstart.java) | -| Submit Hadoop Fs Job | [source code](https://github.com/googleapis/java-dataproc/blob/master/samples/snippets/src/main/java/SubmitHadoopFsJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/SubmitHadoopFsJob.java) | -| Submit Job | [source code](https://github.com/googleapis/java-dataproc/blob/master/samples/snippets/src/main/java/SubmitJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/SubmitJob.java) | +| Create Cluster | [source code](https://github.com/googleapis/java-dataproc/blob/main/samples/snippets/src/main/java/CreateCluster.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/CreateCluster.java) | +| Create Cluster With Autoscaling | [source code](https://github.com/googleapis/java-dataproc/blob/main/samples/snippets/src/main/java/CreateClusterWithAutoscaling.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/CreateClusterWithAutoscaling.java) | +| Instantiate Inline Workflow Template | [source code](https://github.com/googleapis/java-dataproc/blob/main/samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/InstantiateInlineWorkflowTemplate.java) | +| Quickstart | [source code](https://github.com/googleapis/java-dataproc/blob/main/samples/snippets/src/main/java/Quickstart.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/Quickstart.java) | +| Submit Hadoop Fs Job | [source code](https://github.com/googleapis/java-dataproc/blob/main/samples/snippets/src/main/java/SubmitHadoopFsJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/SubmitHadoopFsJob.java) | +| Submit Job | [source code](https://github.com/googleapis/java-dataproc/blob/main/samples/snippets/src/main/java/SubmitJob.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-dataproc&page=editor&open_in_editor=samples/snippets/src/main/java/SubmitJob.java) | @@ -111,9 +131,49 @@ To get help, follow the instructions in the [shared Troubleshooting document][tr Dataproc uses gRPC for the transport layer. -## Java Versions +## Supported Java Versions + +Java 8 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). -Java 7 or above is required for using this client. +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. ## Versioning @@ -121,6 +181,7 @@ Java 7 or above is required for using this client. This library follows [Semantic Versioning](http://semver.org/). + ## Contributing @@ -132,6 +193,7 @@ Please note that this project is released with a Contributor Code of Conduct. By this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + ## License Apache 2.0 - See [LICENSE][license] for more information. @@ -140,14 +202,15 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] +Java is a registered trademark of Oracle and/or its affiliates. + [product-docs]: https://cloud.google.com/dataproc -[javadocs]: https://googleapis.dev/java/google-cloud-dataproc/latest/ +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-dataproc/latest/history [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dataproc/java7.svg [kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dataproc/java7.html [kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dataproc/java8.svg @@ -158,18 +221,27 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] [kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dataproc/java8-win.html [kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dataproc/java11.svg [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-dataproc/java11.html -[stability-image]: https://img.shields.io/badge/stability-ga-green +[stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dataproc.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dataproc&core=gav [authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-sdk]: https://cloud.google.com/sdk/ -[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting -[contributing]: https://github.com/googleapis/java-dataproc/blob/master/CONTRIBUTING.md -[code-of-conduct]: https://github.com/googleapis/java-dataproc/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct -[license]: https://github.com/googleapis/java-dataproc/blob/master/LICENSE +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-dataproc/blob/main/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-dataproc/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-dataproc/blob/main/LICENSE [enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing [enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=dataproc.googleapis.com [libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..8b58ae9c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/codecov.yaml b/codecov.yaml 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 2abcaa0e..00000000 --- a/google-cloud-dataproc-bom/pom.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc-bom - 1.1.2-SNAPSHOT - pom - - com.google.cloud - google-cloud-shared-config - 0.9.2 - - - 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 - - - - - sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - - sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - - - com.google.cloud - google-cloud-dataproc - 1.1.2-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-dataproc-v1beta2 - 0.89.2-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1 - 1.1.2-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-dataproc-v1 - 1.1.2-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1beta2 - 0.89.2-SNAPSHOT - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - true - - - - - \ No newline at end of file diff --git a/google-cloud-dataproc/pom.xml b/google-cloud-dataproc/pom.xml deleted file mode 100644 index 2d9ed57a..00000000 --- a/google-cloud-dataproc/pom.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc - 1.1.2-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 - 1.1.2-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-v1beta2 - - - 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.grpc - grpc-google-cloud-dataproc-v1beta2 - test - - - - com.google.api - gax-grpc - testlib - test - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/google-cloud-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 42681501..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java +++ /dev/null @@ -1,892 +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 com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.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 SERVICE -/** - * 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: - * - *

- * 
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   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: - * - *

- * 
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     AutoscalingPolicyServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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: - * - *


-   * 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent.toString(), 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setPolicy(policy)
-   *     .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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setPolicy(policy)
-   *     .build();
-   *   ApiFuture<AutoscalingPolicy> 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
-   *     .setPolicy(policy)
-   *     .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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
-   *     .setPolicy(policy)
-   *     .build();
-   *   ApiFuture<AutoscalingPolicy> 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<AutoscalingPolicy> 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: - * - *


-   * 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent.toString()).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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListAutoscalingPoliciesPagedResponse> 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListAutoscalingPoliciesResponse response = autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request);
-   *     for (AutoscalingPolicy element : response.getPoliciesList()) {
-   *       // 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> 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, - new ApiFunction() { - @Override - public ListAutoscalingPoliciesPagedResponse apply(ListAutoscalingPoliciesPage input) { - return 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 36d59fbf..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceSettings.java +++ /dev/null @@ -1,246 +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 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: - * - *

- * 
- * 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") -@BetaApi -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)); - } - - private static Builder createDefault() { - return new Builder(AutoscalingPolicyServiceStubSettings.newBuilder()); - } - - protected Builder(AutoscalingPolicyServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AutoscalingPolicyServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public AutoscalingPolicyServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AutoscalingPolicyServiceStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to 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/ClusterControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java deleted file mode 100644 index 371777be..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java +++ /dev/null @@ -1,1087 +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 com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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 SERVICE -/** - * 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: - * - *

- * 
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   String clusterName = "";
- *   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: - * - *

- * 
- * ClusterControllerSettings clusterControllerSettings =
- *     ClusterControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ClusterControllerClient clusterControllerClient =
- *     ClusterControllerClient.create(clusterControllerSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * ClusterControllerSettings clusterControllerSettings =
- *     ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ClusterControllerClient clusterControllerClient =
- *     ClusterControllerClient.create(clusterControllerSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   CreateClusterRequest request = CreateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setCluster(cluster)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   CreateClusterRequest request = CreateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setCluster(cluster)
-   *     .build();
-   *   OperationFuture<Cluster, ClusterOperationMetadata> future = clusterControllerClient.createClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   Cluster response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   CreateClusterRequest request = CreateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setCluster(cluster)
-   *     .build();
-   *   ApiFuture<Operation> 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). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .setCluster(cluster)
-   *     .setUpdateMask(updateMask)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .setCluster(cluster)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   OperationFuture<Cluster, ClusterOperationMetadata> future = clusterControllerClient.updateClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   Cluster response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .setCluster(cluster)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Operation> future = clusterControllerClient.updateClusterCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable updateClusterCallable() { - return stub.updateClusterCallable(); - } - - // 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   OperationFuture<Empty, ClusterOperationMetadata> future = clusterControllerClient.deleteClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   ApiFuture<Operation> future = clusterControllerClient.deleteClusterCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteClusterCallable() { - return stub.deleteClusterCallable(); - } - - // 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   OperationFuture<DiagnoseClusterResults, ClusterOperationMetadata> future = clusterControllerClient.diagnoseClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   DiagnoseClusterResults response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   ApiFuture<Operation> future = clusterControllerClient.diagnoseClusterCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable diagnoseClusterCallable() { - return stub.diagnoseClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets the resource representation for a cluster in a project. - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   GetClusterRequest request = GetClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   GetClusterRequest request = GetClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   ApiFuture<Cluster> 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String filter = "";
-   *   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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListClustersRequest request = ListClustersRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListClustersRequest request = ListClustersRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   ApiFuture<ListClustersPagedResponse> 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListClustersRequest request = ListClustersRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   while (true) {
-   *     ListClustersResponse response = clusterControllerClient.listClustersCallable().call(request);
-   *     for (Cluster element : response.getClustersList()) {
-   *       // 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(); - } - - @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, - new ApiFunction() { - @Override - public ListClustersPagedResponse apply(ListClustersPage input) { - return 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 421263de..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerSettings.java +++ /dev/null @@ -1,304 +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 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: - * - *

- * 
- * 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") -@BetaApi -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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - updateClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).updateClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - deleteClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).deleteClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).diagnoseClusterOperationSettings(); - } - - /** 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(); - } - - 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)); - } - - private static Builder createDefault() { - return new Builder(ClusterControllerStubSettings.newBuilder()); - } - - protected Builder(ClusterControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ClusterControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public ClusterControllerStubSettings.Builder getStubSettingsBuilder() { - return ((ClusterControllerStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createCluster. */ - public UnaryCallSettings.Builder createClusterSettings() { - return getStubSettingsBuilder().createClusterSettings(); - } - - /** Returns the builder for the settings used for calls to createCluster. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateClusterOperationSettings() { - return getStubSettingsBuilder().updateClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteClusterOperationSettings() { - return getStubSettingsBuilder().deleteClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return getStubSettingsBuilder().diagnoseClusterOperationSettings(); - } - - /** 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(); - } - - @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 51856e4c..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java +++ /dev/null @@ -1,941 +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 com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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 SERVICE -/** - * 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: - * - *

- * 
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   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: - * - *

- * 
- * JobControllerSettings jobControllerSettings =
- *     JobControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * JobControllerClient jobControllerClient =
- *     JobControllerClient.create(jobControllerSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * JobControllerSettings jobControllerSettings =
- *     JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * JobControllerClient jobControllerClient =
- *     JobControllerClient.create(jobControllerSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Submits a job to a cluster. - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture submitJobAsOperationAsync( - SubmitJobRequest request) { - return submitJobAsOperationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Submits job to a cluster. - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .build();
-   *   OperationFuture<Job, JobMetadata> future = jobControllerClient.submitJobAsOperationOperationCallable().futureCall(request);
-   *   // Do something
-   *   Job response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - submitJobAsOperationOperationCallable() { - return stub.submitJobAsOperationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Submits job to a cluster. - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .build();
-   *   ApiFuture<Operation> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   GetJobRequest request = GetJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   GetJobRequest request = GetJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String filter = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   ApiFuture<ListJobsPagedResponse> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   while (true) {
-   *     ListJobsResponse response = jobControllerClient.listJobsCallable().call(request);
-   *     for (Job element : response.getJobsList()) {
-   *       // 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   Job job = Job.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .setJob(job)
-   *     .setUpdateMask(updateMask)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   Job job = Job.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .setJob(job)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   CancelJobRequest request = CancelJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   CancelJobRequest request = CancelJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .build();
-   *   ApiFuture<Void> 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, - new ApiFunction() { - @Override - public ListJobsPagedResponse apply(ListJobsPage input) { - return 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 7f3f2964..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerSettings.java +++ /dev/null @@ -1,263 +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 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: - * - *

- * 
- * 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") -@BetaApi -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 submitJobAsOperation. */ - public UnaryCallSettings submitJobAsOperationSettings() { - return ((JobControllerStubSettings) getStubSettings()).submitJobAsOperationSettings(); - } - - /** Returns the object with the settings used for calls to submitJobAsOperation. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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)); - } - - private static Builder createDefault() { - return new Builder(JobControllerStubSettings.newBuilder()); - } - - protected Builder(JobControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(JobControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public JobControllerStubSettings.Builder getStubSettingsBuilder() { - return ((JobControllerStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to submitJob. */ - public UnaryCallSettings.Builder submitJobSettings() { - return getStubSettingsBuilder().submitJobSettings(); - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - public UnaryCallSettings.Builder submitJobAsOperationSettings() { - return getStubSettingsBuilder().submitJobAsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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 87932168..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java +++ /dev/null @@ -1,1544 +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 com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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 SERVICE -/** - * 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: - * - *

- * 
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   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: - * - *

- * 
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     WorkflowTemplateServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     WorkflowTemplateServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // 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: - * - *


-   * 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString()).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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   Map<String, String> 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 100 characters. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   Map<String, String> parameters = new HashMap<>();
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString(), 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 100 characters. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, WorkflowMetadata> future = workflowTemplateServiceClient.instantiateWorkflowTemplateOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> 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: - * - *


-   * 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent.toString(), 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .build();
-   *   OperationFuture<Empty, WorkflowMetadata> future = workflowTemplateServiceClient.instantiateInlineWorkflowTemplateOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .build();
-   *   ApiFuture<Operation> future = workflowTemplateServiceClient.instantiateInlineWorkflowTemplateCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - return stub.instantiateInlineWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates new workflow template. - * - *

Sample 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent.toString(), 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   CreateWorkflowTemplateRequest request = CreateWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   CreateWorkflowTemplateRequest request = CreateWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .build();
-   *   ApiFuture<WorkflowTemplate> 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<WorkflowTemplate> future = workflowTemplateServiceClient.getWorkflowTemplateCallable().futureCall(request);
-   *   // Do something
-   *   WorkflowTemplate response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable - getWorkflowTemplateCallable() { - return stub.getWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates (replaces) workflow template. The updated template must contain version that matches - * the current server version. - * - *

Sample 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   UpdateWorkflowTemplateRequest request = UpdateWorkflowTemplateRequest.newBuilder()
-   *     .setTemplate(template)
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   UpdateWorkflowTemplateRequest request = UpdateWorkflowTemplateRequest.newBuilder()
-   *     .setTemplate(template)
-   *     .build();
-   *   ApiFuture<WorkflowTemplate> 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: - * - *


-   * 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent.toString()).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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListWorkflowTemplatesPagedResponse> 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListWorkflowTemplatesResponse response = workflowTemplateServiceClient.listWorkflowTemplatesCallable().call(request);
-   *     for (WorkflowTemplate element : response.getTemplatesList()) {
-   *       // 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   workflowTemplateServiceClient.deleteWorkflowTemplate(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> 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, - new ApiFunction() { - @Override - public ListWorkflowTemplatesPagedResponse apply(ListWorkflowTemplatesPage input) { - return 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 5ddae67d..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceSettings.java +++ /dev/null @@ -1,308 +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 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: - * - *

- * 
- * 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") -@BetaApi -public class WorkflowTemplateServiceSettings - extends ClientSettings { - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - instantiateInlineWorkflowTemplateOperationSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .instantiateInlineWorkflowTemplateOperationSettings(); - } - - /** 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 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)); - } - - private static Builder createDefault() { - return new Builder(WorkflowTemplateServiceStubSettings.newBuilder()); - } - - protected Builder(WorkflowTemplateServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(WorkflowTemplateServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public WorkflowTemplateServiceStubSettings.Builder getStubSettingsBuilder() { - return ((WorkflowTemplateServiceStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - public UnaryCallSettings.Builder - instantiateWorkflowTemplateSettings() { - return getStubSettingsBuilder().instantiateWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings() { - return getStubSettingsBuilder().instantiateInlineWorkflowTemplateOperationSettings(); - } - - /** 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 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/package-info.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java deleted file mode 100644 index 4072e7af..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java +++ /dev/null @@ -1,92 +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. - */ - -/** - * A client to Cloud Dataproc API. - * - *

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: - * - *

- * 
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- * 
- * 
- * - * ======================= ClusterControllerClient ======================= - * - *

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

Sample for ClusterControllerClient: - * - *

- * 
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   String clusterName = "";
- *   Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * 
- * 
- * - * =================== JobControllerClient =================== - * - *

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

Sample for JobControllerClient: - * - *

- * 
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   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: - * - *

- * 
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
- *   WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
- * }
- * 
- * 
- */ -@Generated("by gapic-generator") -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 01685310..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStub.java +++ /dev/null @@ -1,75 +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.stub; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -import com.google.api.core.BetaApi; -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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -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 07a89b98..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/AutoscalingPolicyServiceStubSettings.java +++ /dev/null @@ -1,594 +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.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: - * - *

- * 
- * 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") -@BetaApi -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; - - /** 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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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(); - } - - 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 - ? payload.getPoliciesList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** 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( - "retry_policy_4_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_3_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))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_5_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_7_codes", - ImmutableSet.copyOf(Lists.newArrayList(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_1_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_3_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); - 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); - 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(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_5_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); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_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); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .createAutoscalingPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - return builder; - } - - 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); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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/ClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.java deleted file mode 100644 index e1fbf8c3..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStub.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. - */ -package com.google.cloud.dataproc.v1.stub; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class ClusterControllerStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - createClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()"); - } - - public UnaryCallable createClusterCallable() { - throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - updateClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()"); - } - - public UnaryCallable updateClusterCallable() { - throw new UnsupportedOperationException("Not implemented: updateClusterCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()"); - } - - public UnaryCallable deleteClusterCallable() { - throw new UnsupportedOperationException("Not implemented: deleteClusterCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - diagnoseClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: diagnoseClusterOperationCallable()"); - } - - public UnaryCallable diagnoseClusterCallable() { - throw new UnsupportedOperationException("Not implemented: diagnoseClusterCallable()"); - } - - 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()"); - } - - @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 1d232648..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/ClusterControllerStubSettings.java +++ /dev/null @@ -1,680 +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.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.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: - * - *

- * 
- * 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") -@BetaApi -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 deleteClusterSettings; - private final OperationCallSettings - deleteClusterOperationSettings; - private final UnaryCallSettings diagnoseClusterSettings; - private final OperationCallSettings< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings; - private final UnaryCallSettings getClusterSettings; - private final PagedCallSettings< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings; - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - updateClusterOperationSettings() { - return updateClusterOperationSettings; - } - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteClusterOperationSettings() { - return deleteClusterOperationSettings; - } - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings() { - return diagnoseClusterOperationSettings; - } - - /** 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; - } - - @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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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(); - deleteClusterSettings = settingsBuilder.deleteClusterSettings().build(); - deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); - diagnoseClusterSettings = settingsBuilder.diagnoseClusterSettings().build(); - diagnoseClusterOperationSettings = settingsBuilder.diagnoseClusterOperationSettings().build(); - getClusterSettings = settingsBuilder.getClusterSettings().build(); - listClustersSettings = settingsBuilder.listClustersSettings().build(); - } - - 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 - ? payload.getClustersList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** 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 deleteClusterSettings; - private final OperationCallSettings.Builder< - DeleteClusterRequest, Empty, ClusterOperationMetadata> - deleteClusterOperationSettings; - private final UnaryCallSettings.Builder - diagnoseClusterSettings; - private final OperationCallSettings.Builder< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationSettings; - private final UnaryCallSettings.Builder getClusterSettings; - private final PagedCallSettings.Builder< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings; - - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_5_codes", - ImmutableSet.copyOf(Lists.newArrayList(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_6_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_5_params", settings); - 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); - - createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - createClusterOperationSettings = OperationCallSettings.newBuilder(); - - updateClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - updateClusterOperationSettings = OperationCallSettings.newBuilder(); - - deleteClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - deleteClusterOperationSettings = OperationCallSettings.newBuilder(); - - diagnoseClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - diagnoseClusterOperationSettings = OperationCallSettings.newBuilder(); - - getClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listClustersSettings = PagedCallSettings.newBuilder(LIST_CLUSTERS_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createClusterSettings, - updateClusterSettings, - deleteClusterSettings, - diagnoseClusterSettings, - getClusterSettings, - listClustersSettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - 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 - .deleteClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .diagnoseClusterSettings() - .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 - .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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(900000L)) - .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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(30000L)) - .build())); - - return builder; - } - - protected Builder(ClusterControllerStubSettings settings) { - super(settings); - - createClusterSettings = settings.createClusterSettings.toBuilder(); - createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); - updateClusterSettings = settings.updateClusterSettings.toBuilder(); - updateClusterOperationSettings = settings.updateClusterOperationSettings.toBuilder(); - deleteClusterSettings = settings.deleteClusterSettings.toBuilder(); - deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); - diagnoseClusterSettings = settings.diagnoseClusterSettings.toBuilder(); - diagnoseClusterOperationSettings = settings.diagnoseClusterOperationSettings.toBuilder(); - getClusterSettings = settings.getClusterSettings.toBuilder(); - listClustersSettings = settings.listClustersSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createClusterSettings, - updateClusterSettings, - deleteClusterSettings, - diagnoseClusterSettings, - getClusterSettings, - listClustersSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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 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 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; - } - - /** 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; - } - - @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 54da4666..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceCallableFactory.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. - */ -package com.google.cloud.dataproc.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, 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 c8f1fde2..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcAutoscalingPolicyServiceStub.java +++ /dev/null @@ -1,329 +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.stub; - -import static com.google.cloud.dataproc.v1.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; -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.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC stub implementation for Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -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 BackgroundResource backgroundResources; - - 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 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; - - GrpcCallSettings - createAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateAutoscalingPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - updateAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateAutoscalingPolicyRequest 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( - new RequestParamsExtractor() { - @Override - public Map extract(GetAutoscalingPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - listAutoscalingPoliciesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listAutoscalingPoliciesMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListAutoscalingPoliciesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - deleteAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteAutoscalingPolicyRequest 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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public UnaryCallable - createAutoscalingPolicyCallable() { - return createAutoscalingPolicyCallable; - } - - public UnaryCallable - updateAutoscalingPolicyCallable() { - return updateAutoscalingPolicyCallable; - } - - public UnaryCallable - getAutoscalingPolicyCallable() { - return getAutoscalingPolicyCallable; - } - - public UnaryCallable - listAutoscalingPoliciesPagedCallable() { - return listAutoscalingPoliciesPagedCallable; - } - - public UnaryCallable - listAutoscalingPoliciesCallable() { - return listAutoscalingPoliciesCallable; - } - - public UnaryCallable deleteAutoscalingPolicyCallable() { - return deleteAutoscalingPolicyCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-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 153e6aa2..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerCallableFactory.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. - */ -package com.google.cloud.dataproc.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, 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 b1c845f0..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcClusterControllerStub.java +++ /dev/null @@ -1,333 +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.stub; - -import static com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.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.UpdateClusterRequest; -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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -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 - 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 - 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 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 final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable createClusterCallable; - private final OperationCallable - createClusterOperationCallable; - private final UnaryCallable updateClusterCallable; - private final OperationCallable - updateClusterOperationCallable; - private final UnaryCallable deleteClusterCallable; - private final OperationCallable - deleteClusterOperationCallable; - private final UnaryCallable diagnoseClusterCallable; - private final OperationCallable< - DiagnoseClusterRequest, DiagnoseClusterResults, ClusterOperationMetadata> - diagnoseClusterOperationCallable; - private final UnaryCallable getClusterCallable; - private final UnaryCallable listClustersCallable; - private final UnaryCallable - listClustersPagedCallable; - - 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) - .build(); - GrpcCallSettings updateClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateClusterMethodDescriptor) - .build(); - GrpcCallSettings deleteClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteClusterMethodDescriptor) - .build(); - GrpcCallSettings diagnoseClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(diagnoseClusterMethodDescriptor) - .build(); - GrpcCallSettings getClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getClusterMethodDescriptor) - .build(); - GrpcCallSettings listClustersTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listClustersMethodDescriptor) - .build(); - - this.createClusterCallable = - callableFactory.createUnaryCallable( - createClusterTransportSettings, settings.createClusterSettings(), clientContext); - this.createClusterOperationCallable = - callableFactory.createOperationCallable( - createClusterTransportSettings, - settings.createClusterOperationSettings(), - clientContext, - this.operationsStub); - this.updateClusterCallable = - callableFactory.createUnaryCallable( - updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); - this.updateClusterOperationCallable = - callableFactory.createOperationCallable( - updateClusterTransportSettings, - settings.updateClusterOperationSettings(), - clientContext, - this.operationsStub); - this.deleteClusterCallable = - callableFactory.createUnaryCallable( - deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); - this.deleteClusterOperationCallable = - callableFactory.createOperationCallable( - deleteClusterTransportSettings, - settings.deleteClusterOperationSettings(), - clientContext, - this.operationsStub); - this.diagnoseClusterCallable = - callableFactory.createUnaryCallable( - diagnoseClusterTransportSettings, settings.diagnoseClusterSettings(), clientContext); - this.diagnoseClusterOperationCallable = - callableFactory.createOperationCallable( - diagnoseClusterTransportSettings, - settings.diagnoseClusterOperationSettings(), - clientContext, - this.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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - createClusterOperationCallable() { - return createClusterOperationCallable; - } - - public UnaryCallable createClusterCallable() { - return createClusterCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - updateClusterOperationCallable() { - return updateClusterOperationCallable; - } - - public UnaryCallable updateClusterCallable() { - return updateClusterCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteClusterOperationCallable() { - return deleteClusterOperationCallable; - } - - public UnaryCallable deleteClusterCallable() { - return deleteClusterCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - diagnoseClusterOperationCallable() { - return diagnoseClusterOperationCallable; - } - - public UnaryCallable diagnoseClusterCallable() { - return diagnoseClusterCallable; - } - - public UnaryCallable getClusterCallable() { - return getClusterCallable; - } - - public UnaryCallable listClustersPagedCallable() { - return listClustersPagedCallable; - } - - public UnaryCallable listClustersCallable() { - return listClustersCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-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 daa86f95..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerCallableFactory.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. - */ -package com.google.cloud.dataproc.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, 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 294bcfb4..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcJobControllerStub.java +++ /dev/null @@ -1,299 +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.stub; - -import static com.google.cloud.dataproc.v1.JobControllerClient.ListJobsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.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.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -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 BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - 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 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) - .build(); - GrpcCallSettings submitJobAsOperationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(submitJobAsOperationMethodDescriptor) - .build(); - GrpcCallSettings getJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getJobMethodDescriptor) - .build(); - GrpcCallSettings listJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listJobsMethodDescriptor) - .build(); - GrpcCallSettings updateJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateJobMethodDescriptor) - .build(); - GrpcCallSettings cancelJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(cancelJobMethodDescriptor) - .build(); - GrpcCallSettings deleteJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteJobMethodDescriptor) - .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, - this.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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - public UnaryCallable submitJobCallable() { - return submitJobCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - submitJobAsOperationOperationCallable() { - return submitJobAsOperationOperationCallable; - } - - public UnaryCallable submitJobAsOperationCallable() { - return submitJobAsOperationCallable; - } - - public UnaryCallable getJobCallable() { - return getJobCallable; - } - - public UnaryCallable listJobsPagedCallable() { - return listJobsPagedCallable; - } - - public UnaryCallable listJobsCallable() { - return listJobsCallable; - } - - public UnaryCallable updateJobCallable() { - return updateJobCallable; - } - - public UnaryCallable cancelJobCallable() { - return cancelJobCallable; - } - - public UnaryCallable deleteJobCallable() { - return deleteJobCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-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 242d2116..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceCallableFactory.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. - */ -package com.google.cloud.dataproc.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, 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 7fb984c3..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/GrpcWorkflowTemplateServiceStub.java +++ /dev/null @@ -1,441 +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.stub; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC stub implementation for Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcWorkflowTemplateServiceStub extends WorkflowTemplateServiceStub { - - 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 - 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 - 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 BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable - instantiateWorkflowTemplateCallable; - private final OperationCallable - instantiateWorkflowTemplateOperationCallable; - private final UnaryCallable - instantiateInlineWorkflowTemplateCallable; - private final OperationCallable - instantiateInlineWorkflowTemplateOperationCallable; - private final UnaryCallable - createWorkflowTemplateCallable; - private final UnaryCallable - getWorkflowTemplateCallable; - private final UnaryCallable - updateWorkflowTemplateCallable; - private final UnaryCallable - listWorkflowTemplatesCallable; - private final UnaryCallable - listWorkflowTemplatesPagedCallable; - private final UnaryCallable deleteWorkflowTemplateCallable; - - 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 - instantiateWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(instantiateWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - InstantiateWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - instantiateInlineWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(instantiateInlineWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - InstantiateInlineWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - createWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - getWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - updateWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateWorkflowTemplateRequest 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( - new RequestParamsExtractor() { - @Override - public Map extract(ListWorkflowTemplatesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings deleteWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - - this.instantiateWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - instantiateWorkflowTemplateTransportSettings, - settings.instantiateWorkflowTemplateSettings(), - clientContext); - this.instantiateWorkflowTemplateOperationCallable = - callableFactory.createOperationCallable( - instantiateWorkflowTemplateTransportSettings, - settings.instantiateWorkflowTemplateOperationSettings(), - clientContext, - this.operationsStub); - this.instantiateInlineWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - instantiateInlineWorkflowTemplateTransportSettings, - settings.instantiateInlineWorkflowTemplateSettings(), - clientContext); - this.instantiateInlineWorkflowTemplateOperationCallable = - callableFactory.createOperationCallable( - instantiateInlineWorkflowTemplateTransportSettings, - settings.instantiateInlineWorkflowTemplateOperationSettings(), - clientContext, - this.operationsStub); - this.createWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - createWorkflowTemplateTransportSettings, - settings.createWorkflowTemplateSettings(), - clientContext); - this.getWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - getWorkflowTemplateTransportSettings, - settings.getWorkflowTemplateSettings(), - clientContext); - 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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateWorkflowTemplateOperationCallable() { - return instantiateWorkflowTemplateOperationCallable; - } - - public UnaryCallable - instantiateWorkflowTemplateCallable() { - return instantiateWorkflowTemplateCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - return instantiateInlineWorkflowTemplateOperationCallable; - } - - public UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - return instantiateInlineWorkflowTemplateCallable; - } - - public UnaryCallable - createWorkflowTemplateCallable() { - return createWorkflowTemplateCallable; - } - - public UnaryCallable getWorkflowTemplateCallable() { - return getWorkflowTemplateCallable; - } - - public UnaryCallable - updateWorkflowTemplateCallable() { - return updateWorkflowTemplateCallable; - } - - public UnaryCallable - listWorkflowTemplatesPagedCallable() { - return listWorkflowTemplatesPagedCallable; - } - - public UnaryCallable - listWorkflowTemplatesCallable() { - return listWorkflowTemplatesCallable; - } - - public UnaryCallable deleteWorkflowTemplateCallable() { - return deleteWorkflowTemplateCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-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 45aab410..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStub.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 - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF 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.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class JobControllerStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public UnaryCallable submitJobCallable() { - throw new UnsupportedOperationException("Not implemented: submitJobCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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 05965c1a..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/JobControllerStubSettings.java +++ /dev/null @@ -1,644 +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.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: - * - *

- * 
- * 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") -@BetaApi -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; - - /** 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 submitJobAsOperation. */ - public UnaryCallSettings submitJobAsOperationSettings() { - return submitJobAsOperationSettings; - } - - /** Returns the object with 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 - 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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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(); - } - - 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 - ? payload.getJobsList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** 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_4_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_3_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))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_5_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_7_codes", - ImmutableSet.copyOf(Lists.newArrayList(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_1_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_3_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); - 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); - 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(300000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(300000L)) - .setTotalTimeout(Duration.ofMillis(300000L)) - .build(); - definitions.put("retry_policy_5_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); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_1_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); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - 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(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - 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); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to submitJob. */ - public UnaryCallSettings.Builder submitJobSettings() { - return submitJobSettings; - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - 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 f87e3a0e..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStub.java +++ /dev/null @@ -1,111 +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.stub; - -import static com.google.cloud.dataproc.v1.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class WorkflowTemplateServiceStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateWorkflowTemplateOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateWorkflowTemplateOperationCallable()"); - } - - public UnaryCallable - instantiateWorkflowTemplateCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateWorkflowTemplateCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateInlineWorkflowTemplateOperationCallable()"); - } - - public UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateInlineWorkflowTemplateCallable()"); - } - - public UnaryCallable - createWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowTemplateCallable()"); - } - - public UnaryCallable getWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: getWorkflowTemplateCallable()"); - } - - 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 33176458..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/stub/WorkflowTemplateServiceStubSettings.java +++ /dev/null @@ -1,665 +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.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: - * - *

- * 
- * 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") -@BetaApi -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 - instantiateWorkflowTemplateSettings; - private final OperationCallSettings - instantiateWorkflowTemplateOperationSettings; - private final UnaryCallSettings - instantiateInlineWorkflowTemplateSettings; - private final OperationCallSettings< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings; - private final UnaryCallSettings - createWorkflowTemplateSettings; - private final UnaryCallSettings - getWorkflowTemplateSettings; - private final UnaryCallSettings - updateWorkflowTemplateSettings; - private final PagedCallSettings< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings; - private final UnaryCallSettings - deleteWorkflowTemplateSettings; - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - instantiateInlineWorkflowTemplateOperationSettings() { - return instantiateInlineWorkflowTemplateOperationSettings; - } - - /** 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 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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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); - - instantiateWorkflowTemplateSettings = - settingsBuilder.instantiateWorkflowTemplateSettings().build(); - instantiateWorkflowTemplateOperationSettings = - settingsBuilder.instantiateWorkflowTemplateOperationSettings().build(); - instantiateInlineWorkflowTemplateSettings = - settingsBuilder.instantiateInlineWorkflowTemplateSettings().build(); - instantiateInlineWorkflowTemplateOperationSettings = - settingsBuilder.instantiateInlineWorkflowTemplateOperationSettings().build(); - createWorkflowTemplateSettings = settingsBuilder.createWorkflowTemplateSettings().build(); - getWorkflowTemplateSettings = settingsBuilder.getWorkflowTemplateSettings().build(); - updateWorkflowTemplateSettings = settingsBuilder.updateWorkflowTemplateSettings().build(); - listWorkflowTemplatesSettings = settingsBuilder.listWorkflowTemplatesSettings().build(); - deleteWorkflowTemplateSettings = settingsBuilder.deleteWorkflowTemplateSettings().build(); - } - - 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 - ? payload.getTemplatesList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** Builder for WorkflowTemplateServiceStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - - 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 - createWorkflowTemplateSettings; - private final UnaryCallSettings.Builder - getWorkflowTemplateSettings; - 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_4_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf(Lists.newArrayList(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); - 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); - - instantiateWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - instantiateWorkflowTemplateOperationSettings = OperationCallSettings.newBuilder(); - - instantiateInlineWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - instantiateInlineWorkflowTemplateOperationSettings = OperationCallSettings.newBuilder(); - - createWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - getWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - updateWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listWorkflowTemplatesSettings = - PagedCallSettings.newBuilder(LIST_WORKFLOW_TEMPLATES_PAGE_STR_FACT); - - deleteWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - instantiateWorkflowTemplateSettings, - instantiateInlineWorkflowTemplateSettings, - createWorkflowTemplateSettings, - getWorkflowTemplateSettings, - updateWorkflowTemplateSettings, - listWorkflowTemplatesSettings, - deleteWorkflowTemplateSettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - 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 - .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 - .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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(43200000L)) - .build())); - - return builder; - } - - protected Builder(WorkflowTemplateServiceStubSettings settings) { - super(settings); - - instantiateWorkflowTemplateSettings = - settings.instantiateWorkflowTemplateSettings.toBuilder(); - instantiateWorkflowTemplateOperationSettings = - settings.instantiateWorkflowTemplateOperationSettings.toBuilder(); - instantiateInlineWorkflowTemplateSettings = - settings.instantiateInlineWorkflowTemplateSettings.toBuilder(); - instantiateInlineWorkflowTemplateOperationSettings = - settings.instantiateInlineWorkflowTemplateOperationSettings.toBuilder(); - createWorkflowTemplateSettings = settings.createWorkflowTemplateSettings.toBuilder(); - getWorkflowTemplateSettings = settings.getWorkflowTemplateSettings.toBuilder(); - updateWorkflowTemplateSettings = settings.updateWorkflowTemplateSettings.toBuilder(); - listWorkflowTemplatesSettings = settings.listWorkflowTemplatesSettings.toBuilder(); - deleteWorkflowTemplateSettings = settings.deleteWorkflowTemplateSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - instantiateWorkflowTemplateSettings, - instantiateInlineWorkflowTemplateSettings, - createWorkflowTemplateSettings, - getWorkflowTemplateSettings, - updateWorkflowTemplateSettings, - listWorkflowTemplatesSettings, - deleteWorkflowTemplateSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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 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 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/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java deleted file mode 100644 index 4c7f769c..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClient.java +++ /dev/null @@ -1,893 +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.v1beta2; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.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.v1beta2.stub.AutoscalingPolicyServiceStub; -import com.google.cloud.dataproc.v1beta2.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 SERVICE -/** - * Service Description: The API interface for managing autoscaling policies in the Cloud 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: - * - *

- * 
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   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: - * - *

- * 
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     AutoscalingPolicyServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * AutoscalingPolicyServiceSettings autoscalingPolicyServiceSettings =
- *     AutoscalingPolicyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
- *     AutoscalingPolicyServiceClient.create(autoscalingPolicyServiceSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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: - * - *


-   * 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 has the - * following format: `projects/{project_id}/regions/{region}` - *

* For `projects.locations.autoscalingPolicies.create`, the resource name 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: - * - *


-   * 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 has the - * following format: `projects/{project_id}/regions/{region}` - *

* For `projects.locations.autoscalingPolicies.create`, the resource name 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent.toString(), 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 has the - * following format: `projects/{project_id}/regions/{region}` - *

* For `projects.locations.autoscalingPolicies.create`, the resource name 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setPolicy(policy)
-   *     .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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   CreateAutoscalingPolicyRequest request = CreateAutoscalingPolicyRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setPolicy(policy)
-   *     .build();
-   *   ApiFuture<AutoscalingPolicy> 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
-   *     .setPolicy(policy)
-   *     .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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
-   *   UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder()
-   *     .setPolicy(policy)
-   *     .build();
-   *   ApiFuture<AutoscalingPolicy> 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   AutoscalingPolicy response = autoscalingPolicyServiceClient.getAutoscalingPolicy(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   GetAutoscalingPolicyRequest request = GetAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<AutoscalingPolicy> 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: - * - *


-   * 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   for (AutoscalingPolicy element : autoscalingPolicyServiceClient.listAutoscalingPolicies(parent.toString()).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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListAutoscalingPoliciesPagedResponse> 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListAutoscalingPoliciesRequest request = ListAutoscalingPoliciesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListAutoscalingPoliciesResponse response = autoscalingPolicyServiceClient.listAutoscalingPoliciesCallable().call(request);
-   *     for (AutoscalingPolicy element : response.getPoliciesList()) {
-   *       // 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: - * - *


-   * 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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   autoscalingPolicyServiceClient.deleteAutoscalingPolicy(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.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: - * - *


-   * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
-   *   AutoscalingPolicyName name = AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName("[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]");
-   *   DeleteAutoscalingPolicyRequest request = DeleteAutoscalingPolicyRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> 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, - new ApiFunction() { - @Override - public ListAutoscalingPoliciesPagedResponse apply(ListAutoscalingPoliciesPage input) { - return 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/v1beta2/AutoscalingPolicyServiceSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceSettings.java deleted file mode 100644 index bba18dee..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceSettings.java +++ /dev/null @@ -1,246 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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)); - } - - private static Builder createDefault() { - return new Builder(AutoscalingPolicyServiceStubSettings.newBuilder()); - } - - protected Builder(AutoscalingPolicyServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(AutoscalingPolicyServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public AutoscalingPolicyServiceStubSettings.Builder getStubSettingsBuilder() { - return ((AutoscalingPolicyServiceStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to 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/v1beta2/ClusterControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java deleted file mode 100644 index ef8757f8..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClient.java +++ /dev/null @@ -1,1087 +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.v1beta2; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.stub.ClusterControllerStub; -import com.google.cloud.dataproc.v1beta2.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 SERVICE -/** - * 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: - * - *

- * 
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   String clusterName = "";
- *   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: - * - *

- * 
- * ClusterControllerSettings clusterControllerSettings =
- *     ClusterControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ClusterControllerClient clusterControllerClient =
- *     ClusterControllerClient.create(clusterControllerSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * ClusterControllerSettings clusterControllerSettings =
- *     ClusterControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * ClusterControllerClient clusterControllerClient =
- *     ClusterControllerClient.create(clusterControllerSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   CreateClusterRequest request = CreateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setCluster(cluster)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   CreateClusterRequest request = CreateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setCluster(cluster)
-   *     .build();
-   *   OperationFuture<Cluster, ClusterOperationMetadata> future = clusterControllerClient.createClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   Cluster response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   CreateClusterRequest request = CreateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setCluster(cluster)
-   *     .build();
-   *   ApiFuture<Operation> 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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> <tr> - * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td> - * </tr> <tr> <td>labels</td><td>Updates labels</td> - * </tr> <tr> - * <td>config.worker_config.num_instances</td><td>Resize primary worker - * group</td> </tr> <tr> - * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary - * worker group</td> </tr> <tr> - * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL - * duration</td> </tr> <tr> - * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL - * deletion timestamp</td> </tr> <tr> - * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL - * duration</td> </tr> <tr> - * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or - * change autoscaling policies</td> </tr> </table> - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .setCluster(cluster)
-   *     .setUpdateMask(updateMask)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .setCluster(cluster)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   OperationFuture<Cluster, ClusterOperationMetadata> future = clusterControllerClient.updateClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   Cluster response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   Cluster cluster = Cluster.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateClusterRequest request = UpdateClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .setCluster(cluster)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Operation> future = clusterControllerClient.updateClusterCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable updateClusterCallable() { - return stub.updateClusterCallable(); - } - - // 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   OperationFuture<Empty, ClusterOperationMetadata> future = clusterControllerClient.deleteClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   ApiFuture<Operation> future = clusterControllerClient.deleteClusterCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteClusterCallable() { - return stub.deleteClusterCallable(); - } - - // 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.v1beta2#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   OperationFuture<Empty, ClusterOperationMetadata> future = clusterControllerClient.diagnoseClusterOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - 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.v1beta2#clusteroperationmetadata). - * After the operation completes, [Operation.response][google.longrunning.Operation.response] - * contains [Empty][google.protobuf.Empty]. - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   DiagnoseClusterRequest request = DiagnoseClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   ApiFuture<Operation> future = clusterControllerClient.diagnoseClusterCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable diagnoseClusterCallable() { - return stub.diagnoseClusterCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets the resource representation for a cluster in a project. - * - *

Sample code: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   GetClusterRequest request = GetClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String clusterName = "";
-   *   GetClusterRequest request = GetClusterRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setClusterName(clusterName)
-   *     .build();
-   *   ApiFuture<Cluster> 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String filter = "";
-   *   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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListClustersRequest request = ListClustersRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListClustersRequest request = ListClustersRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   ApiFuture<ListClustersPagedResponse> 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: - * - *


-   * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListClustersRequest request = ListClustersRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   while (true) {
-   *     ListClustersResponse response = clusterControllerClient.listClustersCallable().call(request);
-   *     for (Cluster element : response.getClustersList()) {
-   *       // 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(); - } - - @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, - new ApiFunction() { - @Override - public ListClustersPagedResponse apply(ListClustersPage input) { - return 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/v1beta2/ClusterControllerSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.java deleted file mode 100644 index bc15c2a9..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSettings.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. - */ -package com.google.cloud.dataproc.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - updateClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).updateClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - deleteClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).deleteClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - diagnoseClusterOperationSettings() { - return ((ClusterControllerStubSettings) getStubSettings()).diagnoseClusterOperationSettings(); - } - - /** 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(); - } - - 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)); - } - - private static Builder createDefault() { - return new Builder(ClusterControllerStubSettings.newBuilder()); - } - - protected Builder(ClusterControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ClusterControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public ClusterControllerStubSettings.Builder getStubSettingsBuilder() { - return ((ClusterControllerStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to createCluster. */ - public UnaryCallSettings.Builder createClusterSettings() { - return getStubSettingsBuilder().createClusterSettings(); - } - - /** Returns the builder for the settings used for calls to createCluster. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateClusterOperationSettings() { - return getStubSettingsBuilder().updateClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteClusterOperationSettings() { - return getStubSettingsBuilder().deleteClusterOperationSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - diagnoseClusterOperationSettings() { - return getStubSettingsBuilder().diagnoseClusterOperationSettings(); - } - - /** 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(); - } - - @Override - public ClusterControllerSettings build() throws IOException { - return new ClusterControllerSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerClient.java deleted file mode 100644 index 317f91de..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerClient.java +++ /dev/null @@ -1,941 +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.v1beta2; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.stub.JobControllerStub; -import com.google.cloud.dataproc.v1beta2.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 SERVICE -/** - * 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: - * - *

- * 
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   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: - * - *

- * 
- * JobControllerSettings jobControllerSettings =
- *     JobControllerSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * JobControllerClient jobControllerClient =
- *     JobControllerClient.create(jobControllerSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * JobControllerSettings jobControllerSettings =
- *     JobControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
- * JobControllerClient jobControllerClient =
- *     JobControllerClient.create(jobControllerSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Submits a job to a cluster. - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture submitJobAsOperationAsync( - SubmitJobRequest request) { - return submitJobAsOperationOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Submits job to a cluster. - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .build();
-   *   OperationFuture<Job, JobMetadata> future = jobControllerClient.submitJobAsOperationOperationCallable().futureCall(request);
-   *   // Do something
-   *   Job response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - submitJobAsOperationOperationCallable() { - return stub.submitJobAsOperationOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Submits job to a cluster. - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   Job job = Job.newBuilder().build();
-   *   SubmitJobRequest request = SubmitJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJob(job)
-   *     .build();
-   *   ApiFuture<Operation> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   GetJobRequest request = GetJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   GetJobRequest request = GetJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String filter = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   ApiFuture<ListJobsPagedResponse> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   ListJobsRequest request = ListJobsRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .build();
-   *   while (true) {
-   *     ListJobsResponse response = jobControllerClient.listJobsCallable().call(request);
-   *     for (Job element : response.getJobsList()) {
-   *       // 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   Job job = Job.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .setJob(job)
-   *     .setUpdateMask(updateMask)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   Job job = Job.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   UpdateJobRequest request = UpdateJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .setJob(job)
-   *     .setUpdateMask(updateMask)
-   *     .build();
-   *   ApiFuture<Job> 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/v1beta2/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   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/v1beta2/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   CancelJobRequest request = CancelJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .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/v1beta2/projects.regions.jobs/list) - * or - * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). - * - *

Sample code: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   CancelJobRequest request = CancelJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .build();
-   *   ApiFuture<Job> 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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .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: - * - *


-   * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
-   *   String projectId = "";
-   *   String region = "";
-   *   String jobId = "";
-   *   DeleteJobRequest request = DeleteJobRequest.newBuilder()
-   *     .setProjectId(projectId)
-   *     .setRegion(region)
-   *     .setJobId(jobId)
-   *     .build();
-   *   ApiFuture<Void> 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, - new ApiFunction() { - @Override - public ListJobsPagedResponse apply(ListJobsPage input) { - return 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/v1beta2/JobControllerSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerSettings.java deleted file mode 100644 index 64548f63..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerSettings.java +++ /dev/null @@ -1,263 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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 submitJobAsOperation. */ - public UnaryCallSettings submitJobAsOperationSettings() { - return ((JobControllerStubSettings) getStubSettings()).submitJobAsOperationSettings(); - } - - /** Returns the object with the settings used for calls to submitJobAsOperation. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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)); - } - - private static Builder createDefault() { - return new Builder(JobControllerStubSettings.newBuilder()); - } - - protected Builder(JobControllerSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(JobControllerStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public JobControllerStubSettings.Builder getStubSettingsBuilder() { - return ((JobControllerStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to submitJob. */ - public UnaryCallSettings.Builder submitJobSettings() { - return getStubSettingsBuilder().submitJobSettings(); - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - public UnaryCallSettings.Builder submitJobAsOperationSettings() { - return getStubSettingsBuilder().submitJobAsOperationSettings(); - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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/v1beta2/WorkflowTemplateServiceClient.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java deleted file mode 100644 index 62caeb0d..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClient.java +++ /dev/null @@ -1,1544 +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.v1beta2; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.stub.WorkflowTemplateServiceStub; -import com.google.cloud.dataproc.v1beta2.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 SERVICE -/** - * 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: - * - *

- * 
- * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   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: - * - *

- * 
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     WorkflowTemplateServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * WorkflowTemplateServiceSettings workflowTemplateServiceSettings =
- *     WorkflowTemplateServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * WorkflowTemplateServiceClient workflowTemplateServiceClient =
- *     WorkflowTemplateServiceClient.create(workflowTemplateServiceSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -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 to use 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. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // 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.v1beta2#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: - * - *


-   * 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString()).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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   Map<String, String> 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 100 characters. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   Map<String, String> parameters = new HashMap<>();
-   *   workflowTemplateServiceClient.instantiateWorkflowTemplateAsync(name.toString(), 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 100 characters. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2#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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, WorkflowMetadata> future = workflowTemplateServiceClient.instantiateWorkflowTemplateOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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.v1beta2#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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   InstantiateWorkflowTemplateRequest request = InstantiateWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: - * - *


-   * 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: - * - *


-   * 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   workflowTemplateServiceClient.instantiateInlineWorkflowTemplateAsync(parent.toString(), 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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .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 - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .build();
-   *   OperationFuture<Empty, WorkflowMetadata> future = workflowTemplateServiceClient.instantiateInlineWorkflowTemplateOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], - * [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   InstantiateInlineWorkflowTemplateRequest request = InstantiateInlineWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .build();
-   *   ApiFuture<Operation> future = workflowTemplateServiceClient.instantiateInlineWorkflowTemplateCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - return stub.instantiateInlineWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates new workflow template. - * - *

Sample 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   WorkflowTemplate response = workflowTemplateServiceClient.createWorkflowTemplate(parent.toString(), 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   CreateWorkflowTemplateRequest request = CreateWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   CreateWorkflowTemplateRequest request = CreateWorkflowTemplateRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setTemplate(template)
-   *     .build();
-   *   ApiFuture<WorkflowTemplate> 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   WorkflowTemplate response = workflowTemplateServiceClient.getWorkflowTemplate(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   GetWorkflowTemplateRequest request = GetWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<WorkflowTemplate> future = workflowTemplateServiceClient.getWorkflowTemplateCallable().futureCall(request);
-   *   // Do something
-   *   WorkflowTemplate response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable - getWorkflowTemplateCallable() { - return stub.getWorkflowTemplateCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates (replaces) workflow template. The updated template must contain version that matches - * the current server version. - * - *

Sample 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   UpdateWorkflowTemplateRequest request = UpdateWorkflowTemplateRequest.newBuilder()
-   *     .setTemplate(template)
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
-   *   UpdateWorkflowTemplateRequest request = UpdateWorkflowTemplateRequest.newBuilder()
-   *     .setTemplate(template)
-   *     .build();
-   *   ApiFuture<WorkflowTemplate> 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: - * - *


-   * 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   for (WorkflowTemplate element : workflowTemplateServiceClient.listWorkflowTemplates(parent.toString()).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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListWorkflowTemplatesPagedResponse> 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
-   *   ListWorkflowTemplatesRequest request = ListWorkflowTemplatesRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListWorkflowTemplatesResponse response = workflowTemplateServiceClient.listWorkflowTemplatesCallable().call(request);
-   *     for (WorkflowTemplate element : response.getTemplatesList()) {
-   *       // 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: - * - *


-   * 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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   workflowTemplateServiceClient.deleteWorkflowTemplate(name.toString());
-   * }
-   * 
- * - * @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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .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: - * - *


-   * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = WorkflowTemplateServiceClient.create()) {
-   *   WorkflowTemplateName name = WorkflowTemplateName.ofProjectRegionWorkflowTemplateName("[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]");
-   *   DeleteWorkflowTemplateRequest request = DeleteWorkflowTemplateRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Void> 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, - new ApiFunction() { - @Override - public ListWorkflowTemplatesPagedResponse apply(ListWorkflowTemplatesPage input) { - return 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/v1beta2/WorkflowTemplateServiceSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceSettings.java deleted file mode 100644 index 1cdc2e87..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceSettings.java +++ /dev/null @@ -1,308 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -public class WorkflowTemplateServiceSettings - extends ClientSettings { - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - instantiateInlineWorkflowTemplateOperationSettings() { - return ((WorkflowTemplateServiceStubSettings) getStubSettings()) - .instantiateInlineWorkflowTemplateOperationSettings(); - } - - /** 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 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)); - } - - private static Builder createDefault() { - return new Builder(WorkflowTemplateServiceStubSettings.newBuilder()); - } - - protected Builder(WorkflowTemplateServiceSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(WorkflowTemplateServiceStubSettings.Builder stubSettings) { - super(stubSettings); - } - - public WorkflowTemplateServiceStubSettings.Builder getStubSettingsBuilder() { - return ((WorkflowTemplateServiceStubSettings.Builder) getStubSettings()); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - public UnaryCallSettings.Builder - instantiateWorkflowTemplateSettings() { - return getStubSettingsBuilder().instantiateWorkflowTemplateSettings(); - } - - /** Returns the builder for the settings used for calls to instantiateWorkflowTemplate. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings() { - return getStubSettingsBuilder().instantiateInlineWorkflowTemplateOperationSettings(); - } - - /** 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 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/v1beta2/package-info.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/package-info.java deleted file mode 100644 index 76ab2821..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/package-info.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Cloud Dataproc API. - * - *

The interfaces provided are listed below, along with usage samples. - * - *

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

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

Sample for AutoscalingPolicyServiceClient: - * - *

- * 
- * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) {
- *   RegionName parent = RegionName.of("[PROJECT]", "[REGION]");
- *   AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
- *   AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
- * }
- * 
- * 
- * - * ======================= ClusterControllerClient ======================= - * - *

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

Sample for ClusterControllerClient: - * - *

- * 
- * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   String clusterName = "";
- *   Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
- * }
- * 
- * 
- * - * =================== JobControllerClient =================== - * - *

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

Sample for JobControllerClient: - * - *

- * 
- * try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
- *   String projectId = "";
- *   String region = "";
- *   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: - * - *

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

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -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/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java deleted file mode 100644 index 03020574..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/AutoscalingPolicyServiceStubSettings.java +++ /dev/null @@ -1,594 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy; -import com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest; -import com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse; -import com.google.cloud.dataproc.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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; - - /** 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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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(); - } - - 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 - ? payload.getPoliciesList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** 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( - "retry_policy_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_4_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_5_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_7_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_1_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_6_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_2_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_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_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_5_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_4_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_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); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .createAutoscalingPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - return builder; - } - - 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); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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/v1beta2/stub/ClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.java deleted file mode 100644 index 0981902f..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStub.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. - */ -package com.google.cloud.dataproc.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.ClusterControllerClient.ListClustersPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.Cluster; -import com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1beta2.CreateClusterRequest; -import com.google.cloud.dataproc.v1beta2.DeleteClusterRequest; -import com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest; -import com.google.cloud.dataproc.v1beta2.GetClusterRequest; -import com.google.cloud.dataproc.v1beta2.ListClustersRequest; -import com.google.cloud.dataproc.v1beta2.ListClustersResponse; -import com.google.cloud.dataproc.v1beta2.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class ClusterControllerStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - createClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createClusterOperationCallable()"); - } - - public UnaryCallable createClusterCallable() { - throw new UnsupportedOperationException("Not implemented: createClusterCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - updateClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateClusterOperationCallable()"); - } - - public UnaryCallable updateClusterCallable() { - throw new UnsupportedOperationException("Not implemented: updateClusterCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteClusterOperationCallable()"); - } - - public UnaryCallable deleteClusterCallable() { - throw new UnsupportedOperationException("Not implemented: deleteClusterCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - diagnoseClusterOperationCallable() { - throw new UnsupportedOperationException("Not implemented: diagnoseClusterOperationCallable()"); - } - - public UnaryCallable diagnoseClusterCallable() { - throw new UnsupportedOperationException("Not implemented: diagnoseClusterCallable()"); - } - - 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()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java deleted file mode 100644 index 4109126d..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/ClusterControllerStubSettings.java +++ /dev/null @@ -1,676 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster; -import com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1beta2.CreateClusterRequest; -import com.google.cloud.dataproc.v1beta2.DeleteClusterRequest; -import com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest; -import com.google.cloud.dataproc.v1beta2.GetClusterRequest; -import com.google.cloud.dataproc.v1beta2.ListClustersRequest; -import com.google.cloud.dataproc.v1beta2.ListClustersResponse; -import com.google.cloud.dataproc.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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 deleteClusterSettings; - private final OperationCallSettings - deleteClusterOperationSettings; - private final UnaryCallSettings diagnoseClusterSettings; - private final OperationCallSettings - diagnoseClusterOperationSettings; - private final UnaryCallSettings getClusterSettings; - private final PagedCallSettings< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings; - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - updateClusterOperationSettings() { - return updateClusterOperationSettings; - } - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteClusterOperationSettings() { - return deleteClusterOperationSettings; - } - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - diagnoseClusterOperationSettings() { - return diagnoseClusterOperationSettings; - } - - /** 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; - } - - @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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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(); - deleteClusterSettings = settingsBuilder.deleteClusterSettings().build(); - deleteClusterOperationSettings = settingsBuilder.deleteClusterOperationSettings().build(); - diagnoseClusterSettings = settingsBuilder.diagnoseClusterSettings().build(); - diagnoseClusterOperationSettings = settingsBuilder.diagnoseClusterOperationSettings().build(); - getClusterSettings = settingsBuilder.getClusterSettings().build(); - listClustersSettings = settingsBuilder.listClustersSettings().build(); - } - - 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 - ? payload.getClustersList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** 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 deleteClusterSettings; - private final OperationCallSettings.Builder< - DeleteClusterRequest, Empty, ClusterOperationMetadata> - deleteClusterOperationSettings; - private final UnaryCallSettings.Builder - diagnoseClusterSettings; - private final OperationCallSettings.Builder< - DiagnoseClusterRequest, Empty, ClusterOperationMetadata> - diagnoseClusterOperationSettings; - private final UnaryCallSettings.Builder getClusterSettings; - private final PagedCallSettings.Builder< - ListClustersRequest, ListClustersResponse, ListClustersPagedResponse> - listClustersSettings; - - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf(Lists.newArrayList(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_2_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_3_params", settings); - 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); - - createClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - createClusterOperationSettings = OperationCallSettings.newBuilder(); - - updateClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - updateClusterOperationSettings = OperationCallSettings.newBuilder(); - - deleteClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - deleteClusterOperationSettings = OperationCallSettings.newBuilder(); - - diagnoseClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - diagnoseClusterOperationSettings = OperationCallSettings.newBuilder(); - - getClusterSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listClustersSettings = PagedCallSettings.newBuilder(LIST_CLUSTERS_PAGE_STR_FACT); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createClusterSettings, - updateClusterSettings, - deleteClusterSettings, - diagnoseClusterSettings, - getClusterSettings, - listClustersSettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .createClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .updateClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .deleteClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .diagnoseClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); - - builder - .getClusterSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - - builder - .listClustersSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); - builder - .createClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - builder - .updateClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - builder - .deleteClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(900000L)) - .build())); - builder - .diagnoseClusterOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(30000L)) - .build())); - - return builder; - } - - protected Builder(ClusterControllerStubSettings settings) { - super(settings); - - createClusterSettings = settings.createClusterSettings.toBuilder(); - createClusterOperationSettings = settings.createClusterOperationSettings.toBuilder(); - updateClusterSettings = settings.updateClusterSettings.toBuilder(); - updateClusterOperationSettings = settings.updateClusterOperationSettings.toBuilder(); - deleteClusterSettings = settings.deleteClusterSettings.toBuilder(); - deleteClusterOperationSettings = settings.deleteClusterOperationSettings.toBuilder(); - diagnoseClusterSettings = settings.diagnoseClusterSettings.toBuilder(); - diagnoseClusterOperationSettings = settings.diagnoseClusterOperationSettings.toBuilder(); - getClusterSettings = settings.getClusterSettings.toBuilder(); - listClustersSettings = settings.listClustersSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - createClusterSettings, - updateClusterSettings, - deleteClusterSettings, - diagnoseClusterSettings, - getClusterSettings, - listClustersSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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 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 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 - diagnoseClusterOperationSettings() { - return diagnoseClusterOperationSettings; - } - - /** 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; - } - - @Override - public ClusterControllerStubSettings build() throws IOException { - return new ClusterControllerStubSettings(this); - } - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceCallableFactory.java deleted file mode 100644 index a49d57fe..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceCallableFactory.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. - */ -package com.google.cloud.dataproc.v1beta2.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceStub.java deleted file mode 100644 index 789dabd5..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcAutoscalingPolicyServiceStub.java +++ /dev/null @@ -1,329 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.AutoscalingPolicyServiceClient.ListAutoscalingPoliciesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.AutoscalingPolicy; -import com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest; -import com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest; -import com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse; -import com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest; -import com.google.common.collect.ImmutableMap; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC stub implementation for Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcAutoscalingPolicyServiceStub extends AutoscalingPolicyServiceStub { - - private static final MethodDescriptor - createAutoscalingPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicyService/DeleteAutoscalingPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteAutoscalingPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - - 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 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; - - GrpcCallSettings - createAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateAutoscalingPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - updateAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateAutoscalingPolicyRequest 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( - new RequestParamsExtractor() { - @Override - public Map extract(GetAutoscalingPolicyRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - listAutoscalingPoliciesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listAutoscalingPoliciesMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListAutoscalingPoliciesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - deleteAutoscalingPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteAutoscalingPolicyMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteAutoscalingPolicyRequest 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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public UnaryCallable - createAutoscalingPolicyCallable() { - return createAutoscalingPolicyCallable; - } - - public UnaryCallable - updateAutoscalingPolicyCallable() { - return updateAutoscalingPolicyCallable; - } - - public UnaryCallable - getAutoscalingPolicyCallable() { - return getAutoscalingPolicyCallable; - } - - public UnaryCallable - listAutoscalingPoliciesPagedCallable() { - return listAutoscalingPoliciesPagedCallable; - } - - public UnaryCallable - listAutoscalingPoliciesCallable() { - return listAutoscalingPoliciesCallable; - } - - public UnaryCallable deleteAutoscalingPolicyCallable() { - return deleteAutoscalingPolicyCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerCallableFactory.java deleted file mode 100644 index 0ed5f4b0..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerCallableFactory.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. - */ -package com.google.cloud.dataproc.v1beta2.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java deleted file mode 100644 index 402eb8f6..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcClusterControllerStub.java +++ /dev/null @@ -1,331 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.ClusterControllerClient.ListClustersPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.Cluster; -import com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata; -import com.google.cloud.dataproc.v1beta2.CreateClusterRequest; -import com.google.cloud.dataproc.v1beta2.DeleteClusterRequest; -import com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest; -import com.google.cloud.dataproc.v1beta2.GetClusterRequest; -import com.google.cloud.dataproc.v1beta2.ListClustersRequest; -import com.google.cloud.dataproc.v1beta2.ListClustersResponse; -import com.google.cloud.dataproc.v1beta2.UpdateClusterRequest; -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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcClusterControllerStub extends ClusterControllerStub { - - private static final MethodDescriptor - createClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1beta2.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.v1beta2.ClusterController/UpdateCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - deleteClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1beta2.ClusterController/DeleteCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - diagnoseClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1beta2.ClusterController/DiagnoseCluster") - .setRequestMarshaller( - ProtoUtils.marshaller(DiagnoseClusterRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor getClusterMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1beta2.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.v1beta2.ClusterController/ListClusters") - .setRequestMarshaller(ProtoUtils.marshaller(ListClustersRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListClustersResponse.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable createClusterCallable; - private final OperationCallable - createClusterOperationCallable; - private final UnaryCallable updateClusterCallable; - private final OperationCallable - updateClusterOperationCallable; - private final UnaryCallable deleteClusterCallable; - private final OperationCallable - deleteClusterOperationCallable; - private final UnaryCallable diagnoseClusterCallable; - private final OperationCallable - diagnoseClusterOperationCallable; - private final UnaryCallable getClusterCallable; - private final UnaryCallable listClustersCallable; - private final UnaryCallable - listClustersPagedCallable; - - 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) - .build(); - GrpcCallSettings updateClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateClusterMethodDescriptor) - .build(); - GrpcCallSettings deleteClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteClusterMethodDescriptor) - .build(); - GrpcCallSettings diagnoseClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(diagnoseClusterMethodDescriptor) - .build(); - GrpcCallSettings getClusterTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getClusterMethodDescriptor) - .build(); - GrpcCallSettings listClustersTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listClustersMethodDescriptor) - .build(); - - this.createClusterCallable = - callableFactory.createUnaryCallable( - createClusterTransportSettings, settings.createClusterSettings(), clientContext); - this.createClusterOperationCallable = - callableFactory.createOperationCallable( - createClusterTransportSettings, - settings.createClusterOperationSettings(), - clientContext, - this.operationsStub); - this.updateClusterCallable = - callableFactory.createUnaryCallable( - updateClusterTransportSettings, settings.updateClusterSettings(), clientContext); - this.updateClusterOperationCallable = - callableFactory.createOperationCallable( - updateClusterTransportSettings, - settings.updateClusterOperationSettings(), - clientContext, - this.operationsStub); - this.deleteClusterCallable = - callableFactory.createUnaryCallable( - deleteClusterTransportSettings, settings.deleteClusterSettings(), clientContext); - this.deleteClusterOperationCallable = - callableFactory.createOperationCallable( - deleteClusterTransportSettings, - settings.deleteClusterOperationSettings(), - clientContext, - this.operationsStub); - this.diagnoseClusterCallable = - callableFactory.createUnaryCallable( - diagnoseClusterTransportSettings, settings.diagnoseClusterSettings(), clientContext); - this.diagnoseClusterOperationCallable = - callableFactory.createOperationCallable( - diagnoseClusterTransportSettings, - settings.diagnoseClusterOperationSettings(), - clientContext, - this.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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - createClusterOperationCallable() { - return createClusterOperationCallable; - } - - public UnaryCallable createClusterCallable() { - return createClusterCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - updateClusterOperationCallable() { - return updateClusterOperationCallable; - } - - public UnaryCallable updateClusterCallable() { - return updateClusterCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteClusterOperationCallable() { - return deleteClusterOperationCallable; - } - - public UnaryCallable deleteClusterCallable() { - return deleteClusterCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - diagnoseClusterOperationCallable() { - return diagnoseClusterOperationCallable; - } - - public UnaryCallable diagnoseClusterCallable() { - return diagnoseClusterCallable; - } - - public UnaryCallable getClusterCallable() { - return getClusterCallable; - } - - public UnaryCallable listClustersPagedCallable() { - return listClustersPagedCallable; - } - - public UnaryCallable listClustersCallable() { - return listClustersCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerCallableFactory.java deleted file mode 100644 index 041e766c..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerCallableFactory.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. - */ -package com.google.cloud.dataproc.v1beta2.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerStub.java deleted file mode 100644 index cf798a51..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcJobControllerStub.java +++ /dev/null @@ -1,299 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.JobControllerClient.ListJobsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.CancelJobRequest; -import com.google.cloud.dataproc.v1beta2.DeleteJobRequest; -import com.google.cloud.dataproc.v1beta2.GetJobRequest; -import com.google.cloud.dataproc.v1beta2.Job; -import com.google.cloud.dataproc.v1beta2.JobMetadata; -import com.google.cloud.dataproc.v1beta2.ListJobsRequest; -import com.google.cloud.dataproc.v1beta2.ListJobsResponse; -import com.google.cloud.dataproc.v1beta2.SubmitJobRequest; -import com.google.cloud.dataproc.v1beta2.UpdateJobRequest; -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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcJobControllerStub extends JobControllerStub { - - private static final MethodDescriptor submitJobMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobController/DeleteJob") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteJobRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - 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 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) - .build(); - GrpcCallSettings submitJobAsOperationTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(submitJobAsOperationMethodDescriptor) - .build(); - GrpcCallSettings getJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getJobMethodDescriptor) - .build(); - GrpcCallSettings listJobsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listJobsMethodDescriptor) - .build(); - GrpcCallSettings updateJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateJobMethodDescriptor) - .build(); - GrpcCallSettings cancelJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(cancelJobMethodDescriptor) - .build(); - GrpcCallSettings deleteJobTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteJobMethodDescriptor) - .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, - this.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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - public UnaryCallable submitJobCallable() { - return submitJobCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - submitJobAsOperationOperationCallable() { - return submitJobAsOperationOperationCallable; - } - - public UnaryCallable submitJobAsOperationCallable() { - return submitJobAsOperationCallable; - } - - public UnaryCallable getJobCallable() { - return getJobCallable; - } - - public UnaryCallable listJobsPagedCallable() { - return listJobsPagedCallable; - } - - public UnaryCallable listJobsCallable() { - return listJobsCallable; - } - - public UnaryCallable updateJobCallable() { - return updateJobCallable; - } - - public UnaryCallable cancelJobCallable() { - return cancelJobCallable; - } - - public UnaryCallable deleteJobCallable() { - return deleteJobCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceCallableFactory.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceCallableFactory.java deleted file mode 100644 index c35eae9e..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceCallableFactory.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. - */ -package com.google.cloud.dataproc.v1beta2.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Dataproc API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -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 pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceStub.java deleted file mode 100644 index 0d14c4b8..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/GrpcWorkflowTemplateServiceStub.java +++ /dev/null @@ -1,441 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest; -import com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse; -import com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.WorkflowMetadata; -import com.google.cloud.dataproc.v1beta2.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.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC stub implementation for Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcWorkflowTemplateServiceStub extends WorkflowTemplateServiceStub { - - private static final MethodDescriptor - instantiateWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplateService/InstantiateInlineWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller( - InstantiateInlineWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - createWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplateService/GetWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(GetWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(WorkflowTemplate.getDefaultInstance())) - .build(); - private static final MethodDescriptor - updateWorkflowTemplateMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplateService/DeleteWorkflowTemplate") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteWorkflowTemplateRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable - instantiateWorkflowTemplateCallable; - private final OperationCallable - instantiateWorkflowTemplateOperationCallable; - private final UnaryCallable - instantiateInlineWorkflowTemplateCallable; - private final OperationCallable - instantiateInlineWorkflowTemplateOperationCallable; - private final UnaryCallable - createWorkflowTemplateCallable; - private final UnaryCallable - getWorkflowTemplateCallable; - private final UnaryCallable - updateWorkflowTemplateCallable; - private final UnaryCallable - listWorkflowTemplatesCallable; - private final UnaryCallable - listWorkflowTemplatesPagedCallable; - private final UnaryCallable deleteWorkflowTemplateCallable; - - 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 - instantiateWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(instantiateWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - InstantiateWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - instantiateInlineWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(instantiateInlineWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract( - InstantiateInlineWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - createWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - getWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - updateWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateWorkflowTemplateRequest 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( - new RequestParamsExtractor() { - @Override - public Map extract(ListWorkflowTemplatesRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings deleteWorkflowTemplateTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowTemplateMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeleteWorkflowTemplateRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - - this.instantiateWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - instantiateWorkflowTemplateTransportSettings, - settings.instantiateWorkflowTemplateSettings(), - clientContext); - this.instantiateWorkflowTemplateOperationCallable = - callableFactory.createOperationCallable( - instantiateWorkflowTemplateTransportSettings, - settings.instantiateWorkflowTemplateOperationSettings(), - clientContext, - this.operationsStub); - this.instantiateInlineWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - instantiateInlineWorkflowTemplateTransportSettings, - settings.instantiateInlineWorkflowTemplateSettings(), - clientContext); - this.instantiateInlineWorkflowTemplateOperationCallable = - callableFactory.createOperationCallable( - instantiateInlineWorkflowTemplateTransportSettings, - settings.instantiateInlineWorkflowTemplateOperationSettings(), - clientContext, - this.operationsStub); - this.createWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - createWorkflowTemplateTransportSettings, - settings.createWorkflowTemplateSettings(), - clientContext); - this.getWorkflowTemplateCallable = - callableFactory.createUnaryCallable( - getWorkflowTemplateTransportSettings, - settings.getWorkflowTemplateSettings(), - clientContext); - 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); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateWorkflowTemplateOperationCallable() { - return instantiateWorkflowTemplateOperationCallable; - } - - public UnaryCallable - instantiateWorkflowTemplateCallable() { - return instantiateWorkflowTemplateCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - return instantiateInlineWorkflowTemplateOperationCallable; - } - - public UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - return instantiateInlineWorkflowTemplateCallable; - } - - public UnaryCallable - createWorkflowTemplateCallable() { - return createWorkflowTemplateCallable; - } - - public UnaryCallable getWorkflowTemplateCallable() { - return getWorkflowTemplateCallable; - } - - public UnaryCallable - updateWorkflowTemplateCallable() { - return updateWorkflowTemplateCallable; - } - - public UnaryCallable - listWorkflowTemplatesPagedCallable() { - return listWorkflowTemplatesPagedCallable; - } - - public UnaryCallable - listWorkflowTemplatesCallable() { - return listWorkflowTemplatesCallable; - } - - public UnaryCallable deleteWorkflowTemplateCallable() { - return deleteWorkflowTemplateCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStub.java deleted file mode 100644 index 98ecabe5..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStub.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 - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF 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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.JobControllerClient.ListJobsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.CancelJobRequest; -import com.google.cloud.dataproc.v1beta2.DeleteJobRequest; -import com.google.cloud.dataproc.v1beta2.GetJobRequest; -import com.google.cloud.dataproc.v1beta2.Job; -import com.google.cloud.dataproc.v1beta2.JobMetadata; -import com.google.cloud.dataproc.v1beta2.ListJobsRequest; -import com.google.cloud.dataproc.v1beta2.ListJobsResponse; -import com.google.cloud.dataproc.v1beta2.SubmitJobRequest; -import com.google.cloud.dataproc.v1beta2.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class JobControllerStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public UnaryCallable submitJobCallable() { - throw new UnsupportedOperationException("Not implemented: submitJobCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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/v1beta2/stub/JobControllerStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java deleted file mode 100644 index ed45827a..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/JobControllerStubSettings.java +++ /dev/null @@ -1,644 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest; -import com.google.cloud.dataproc.v1beta2.DeleteJobRequest; -import com.google.cloud.dataproc.v1beta2.GetJobRequest; -import com.google.cloud.dataproc.v1beta2.Job; -import com.google.cloud.dataproc.v1beta2.JobMetadata; -import com.google.cloud.dataproc.v1beta2.ListJobsRequest; -import com.google.cloud.dataproc.v1beta2.ListJobsResponse; -import com.google.cloud.dataproc.v1beta2.SubmitJobRequest; -import com.google.cloud.dataproc.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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; - - /** 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 submitJobAsOperation. */ - public UnaryCallSettings submitJobAsOperationSettings() { - return submitJobAsOperationSettings; - } - - /** Returns the object with 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 - 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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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(); - } - - 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 - ? payload.getJobsList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** 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_1_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_4_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_6_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_3_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.INTERNAL, - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_2_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_5_codes", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, - StatusCode.Code.INTERNAL, - StatusCode.Code.UNAVAILABLE))); - definitions.put( - "retry_policy_7_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_1_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_6_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_2_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_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_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_5_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_4_params", settings); - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_1_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); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .submitJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - - builder - .submitJobAsOperationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - - builder - .getJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .listJobsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .updateJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - - builder - .cancelJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params")); - - builder - .deleteJobSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); - builder - .submitJobAsOperationOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")) - .build()) - .setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Job.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(JobMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - 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); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to submitJob. */ - public UnaryCallSettings.Builder submitJobSettings() { - return submitJobSettings; - } - - /** Returns the builder for the settings used for calls to submitJobAsOperation. */ - 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/v1beta2/stub/WorkflowTemplateServiceStub.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStub.java deleted file mode 100644 index 16b566c7..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStub.java +++ /dev/null @@ -1,111 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.WorkflowTemplateServiceClient.ListWorkflowTemplatesPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest; -import com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse; -import com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.WorkflowMetadata; -import com.google.cloud.dataproc.v1beta2.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 Cloud Dataproc API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class WorkflowTemplateServiceStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateWorkflowTemplateOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateWorkflowTemplateOperationCallable()"); - } - - public UnaryCallable - instantiateWorkflowTemplateCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateWorkflowTemplateCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - instantiateInlineWorkflowTemplateOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateInlineWorkflowTemplateOperationCallable()"); - } - - public UnaryCallable - instantiateInlineWorkflowTemplateCallable() { - throw new UnsupportedOperationException( - "Not implemented: instantiateInlineWorkflowTemplateCallable()"); - } - - public UnaryCallable - createWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowTemplateCallable()"); - } - - public UnaryCallable getWorkflowTemplateCallable() { - throw new UnsupportedOperationException("Not implemented: getWorkflowTemplateCallable()"); - } - - 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/v1beta2/stub/WorkflowTemplateServiceStubSettings.java b/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java deleted file mode 100644 index e2d7f86e..00000000 --- a/google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1beta2/stub/WorkflowTemplateServiceStubSettings.java +++ /dev/null @@ -1,665 +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.v1beta2.stub; - -import static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest; -import com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse; -import com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest; -import com.google.cloud.dataproc.v1beta2.WorkflowMetadata; -import com.google.cloud.dataproc.v1beta2.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: - * - *

- * 
- * 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") -@BetaApi -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 - instantiateWorkflowTemplateSettings; - private final OperationCallSettings - instantiateWorkflowTemplateOperationSettings; - private final UnaryCallSettings - instantiateInlineWorkflowTemplateSettings; - private final OperationCallSettings< - InstantiateInlineWorkflowTemplateRequest, Empty, WorkflowMetadata> - instantiateInlineWorkflowTemplateOperationSettings; - private final UnaryCallSettings - createWorkflowTemplateSettings; - private final UnaryCallSettings - getWorkflowTemplateSettings; - private final UnaryCallSettings - updateWorkflowTemplateSettings; - private final PagedCallSettings< - ListWorkflowTemplatesRequest, - ListWorkflowTemplatesResponse, - ListWorkflowTemplatesPagedResponse> - listWorkflowTemplatesSettings; - private final UnaryCallSettings - deleteWorkflowTemplateSettings; - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - instantiateInlineWorkflowTemplateOperationSettings() { - return instantiateInlineWorkflowTemplateOperationSettings; - } - - /** 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 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); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + 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 service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(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); - - instantiateWorkflowTemplateSettings = - settingsBuilder.instantiateWorkflowTemplateSettings().build(); - instantiateWorkflowTemplateOperationSettings = - settingsBuilder.instantiateWorkflowTemplateOperationSettings().build(); - instantiateInlineWorkflowTemplateSettings = - settingsBuilder.instantiateInlineWorkflowTemplateSettings().build(); - instantiateInlineWorkflowTemplateOperationSettings = - settingsBuilder.instantiateInlineWorkflowTemplateOperationSettings().build(); - createWorkflowTemplateSettings = settingsBuilder.createWorkflowTemplateSettings().build(); - getWorkflowTemplateSettings = settingsBuilder.getWorkflowTemplateSettings().build(); - updateWorkflowTemplateSettings = settingsBuilder.updateWorkflowTemplateSettings().build(); - listWorkflowTemplatesSettings = settingsBuilder.listWorkflowTemplatesSettings().build(); - deleteWorkflowTemplateSettings = settingsBuilder.deleteWorkflowTemplateSettings().build(); - } - - 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 - ? payload.getTemplatesList() - : ImmutableList.of(); - } - }; - - 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); - } - }; - - /** Builder for WorkflowTemplateServiceStubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - - 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 - createWorkflowTemplateSettings; - private final UnaryCallSettings.Builder - getWorkflowTemplateSettings; - 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_6_codes", - ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put( - "retry_policy_7_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_6_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_7_params", settings); - 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); - - instantiateWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - instantiateWorkflowTemplateOperationSettings = OperationCallSettings.newBuilder(); - - instantiateInlineWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - instantiateInlineWorkflowTemplateOperationSettings = OperationCallSettings.newBuilder(); - - createWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - getWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - updateWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listWorkflowTemplatesSettings = - PagedCallSettings.newBuilder(LIST_WORKFLOW_TEMPLATES_PAGE_STR_FACT); - - deleteWorkflowTemplateSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - instantiateWorkflowTemplateSettings, - instantiateInlineWorkflowTemplateSettings, - createWorkflowTemplateSettings, - getWorkflowTemplateSettings, - updateWorkflowTemplateSettings, - listWorkflowTemplatesSettings, - deleteWorkflowTemplateSettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .instantiateWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .instantiateInlineWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .createWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .getWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")); - - builder - .updateWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - - builder - .listWorkflowTemplatesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_7_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_7_params")); - - builder - .deleteWorkflowTemplateSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_params")); - builder - .instantiateWorkflowTemplateOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(43200000L)) - .build())); - builder - .instantiateInlineWorkflowTemplateOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - . - newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_6_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_6_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) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(43200000L)) - .build())); - - return builder; - } - - protected Builder(WorkflowTemplateServiceStubSettings settings) { - super(settings); - - instantiateWorkflowTemplateSettings = - settings.instantiateWorkflowTemplateSettings.toBuilder(); - instantiateWorkflowTemplateOperationSettings = - settings.instantiateWorkflowTemplateOperationSettings.toBuilder(); - instantiateInlineWorkflowTemplateSettings = - settings.instantiateInlineWorkflowTemplateSettings.toBuilder(); - instantiateInlineWorkflowTemplateOperationSettings = - settings.instantiateInlineWorkflowTemplateOperationSettings.toBuilder(); - createWorkflowTemplateSettings = settings.createWorkflowTemplateSettings.toBuilder(); - getWorkflowTemplateSettings = settings.getWorkflowTemplateSettings.toBuilder(); - updateWorkflowTemplateSettings = settings.updateWorkflowTemplateSettings.toBuilder(); - listWorkflowTemplatesSettings = settings.listWorkflowTemplatesSettings.toBuilder(); - deleteWorkflowTemplateSettings = settings.deleteWorkflowTemplateSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - instantiateWorkflowTemplateSettings, - instantiateInlineWorkflowTemplateSettings, - createWorkflowTemplateSettings, - getWorkflowTemplateSettings, - updateWorkflowTemplateSettings, - listWorkflowTemplatesSettings, - deleteWorkflowTemplateSettings); - } - - // NEXT_MAJOR_VER: remove 'throws Exception' - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to 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 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 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 7282abc0..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClientTest.java +++ /dev/null @@ -1,320 +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 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.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class AutoscalingPolicyServiceClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private AutoscalingPolicyServiceClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - AutoscalingPolicyServiceSettings settings = - AutoscalingPolicyServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AutoscalingPolicyServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void createAutoscalingPolicyTest() { - String id = "id3355"; - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).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, RegionName.parse(actualRequest.getParent())); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void createAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void updateAutoscalingPolicyTest() { - String id = "id3355"; - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).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 - @SuppressWarnings("all") - public void updateAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void getAutoscalingPolicyTest() { - String id = "id3355"; - AutoscalingPolicyName name2 = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder().setId(id).setName(name2.toString()).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, AutoscalingPolicyName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void listAutoscalingPoliciesTest() { - String nextPageToken = ""; - AutoscalingPolicy policiesElement = AutoscalingPolicy.newBuilder().build(); - List policies = Arrays.asList(policiesElement); - ListAutoscalingPoliciesResponse expectedResponse = - ListAutoscalingPoliciesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllPolicies(policies) - .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, RegionName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listAutoscalingPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void deleteAutoscalingPolicyTest() { - 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, AutoscalingPolicyName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - } - } -} 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 8c1163ce..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerClientTest.java +++ /dev/null @@ -1,484 +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 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.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class ClusterControllerClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private ClusterControllerClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - ClusterControllerSettings settings = - ClusterControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ClusterControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void createClusterTest() throws Exception { - String projectId2 = "projectId2939242356"; - String clusterName = "clusterName-1018081872"; - String clusterUuid = "clusterUuid-1017854240"; - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId(projectId2) - .setClusterName(clusterName) - .setClusterUuid(clusterUuid) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void createClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void updateClusterTest() throws Exception { - String projectId2 = "projectId2939242356"; - String clusterName2 = "clusterName2875867491"; - String clusterUuid = "clusterUuid-1017854240"; - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId(projectId2) - .setClusterName(clusterName2) - .setClusterUuid(clusterUuid) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - 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 - @SuppressWarnings("all") - public void updateClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - 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 - @SuppressWarnings("all") - 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-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - Empty actualResponse = client.deleteClusterAsync(projectId, region, clusterName).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - 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 - @SuppressWarnings("all") - public void deleteClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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 - @SuppressWarnings("all") - public void diagnoseClusterTest() throws Exception { - String outputUri = "outputUri-1273518802"; - DiagnoseClusterResults expectedResponse = - DiagnoseClusterResults.newBuilder().setOutputUri(outputUri).build(); - Operation resultOperation = - Operation.newBuilder() - .setName("diagnoseClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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 - @SuppressWarnings("all") - public void diagnoseClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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()); - } - } - - @Test - @SuppressWarnings("all") - public void getClusterTest() { - String projectId2 = "projectId2939242356"; - String clusterName2 = "clusterName2875867491"; - String clusterUuid = "clusterUuid-1017854240"; - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId(projectId2) - .setClusterName(clusterName2) - .setClusterUuid(clusterUuid) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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 - @SuppressWarnings("all") - public void getClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - client.getCluster(projectId, region, clusterName); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listClustersTest() { - String nextPageToken = ""; - Cluster clustersElement = Cluster.newBuilder().build(); - List clusters = Arrays.asList(clustersElement); - ListClustersResponse expectedResponse = - ListClustersResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllClusters(clusters) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listClustersExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listClusters(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listClustersTest2() { - String nextPageToken = ""; - Cluster clustersElement = Cluster.newBuilder().build(); - List clusters = Arrays.asList(clustersElement); - ListClustersResponse expectedResponse = - ListClustersResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllClusters(clusters) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listClustersExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listClusters(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerSmokeTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerSmokeTest.java deleted file mode 100644 index 99a96095..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/ClusterControllerSmokeTest.java +++ /dev/null @@ -1,65 +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 com.google.cloud.dataproc.v1.ClusterControllerClient.ListClustersPagedResponse; - -import com.google.common.base.Preconditions; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class ClusterControllerSmokeTest { - private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT"; - private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT"; - - @Test - public void run() { - main(null); - } - - public static void main(String args[]) { - Logger.getLogger("").setLevel(Level.WARNING); - try { - executeNoCatch(getProjectId()); - System.out.println("OK"); - } catch (Exception e) { - System.err.println("Failed with exception:"); - e.printStackTrace(System.err); - System.exit(1); - } - } - - public static void executeNoCatch(String projectId) throws Exception { - try (ClusterControllerClient client = ClusterControllerClient.create()) { - String projectId2 = projectId; - String region = "global"; - - ListClustersPagedResponse pagedResponse = client.listClusters(projectId2, region); - } - } - - private static String getProjectId() { - String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME)); - if (projectId == null) { - projectId = - System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME)); - } - Preconditions.checkArgument(projectId != null, "A project ID is required."); - return projectId; - } -} 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 1999bf0f..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/JobControllerClientTest.java +++ /dev/null @@ -1,535 +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 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.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class JobControllerClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private JobControllerClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - JobControllerSettings settings = - JobControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = JobControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void submitJobTest() { - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void submitJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void submitJobAsOperationTest() throws Exception { - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("submitJobAsOperationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockJobController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void submitJobAsOperationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void getJobTest() { - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 - @SuppressWarnings("all") - public void getJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - client.getJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listJobsTest() { - String nextPageToken = ""; - Job jobsElement = Job.newBuilder().build(); - List jobs = Arrays.asList(jobsElement); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listJobs(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listJobsTest2() { - String nextPageToken = ""; - Job jobsElement = Job.newBuilder().build(); - List jobs = Arrays.asList(jobsElement); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listJobsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listJobs(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void updateJobTest() { - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - Job job = Job.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - UpdateJobRequest request = - UpdateJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .setJob(job) - .setUpdateMask(updateMask) - .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(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(jobId, actualRequest.getJobId()); - Assert.assertEquals(job, actualRequest.getJob()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void updateJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - Job job = Job.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - UpdateJobRequest request = - UpdateJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .setJob(job) - .setUpdateMask(updateMask) - .build(); - - client.updateJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void cancelJobTest() { - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 - @SuppressWarnings("all") - public void cancelJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - client.cancelJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void deleteJobTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 - @SuppressWarnings("all") - public void deleteJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 133ec7bf..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyService.java +++ /dev/null @@ -1,57 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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 35daafac..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockAutoscalingPolicyServiceImpl.java +++ /dev/null @@ -1,135 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateAutoscalingPolicy( - UpdateAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getAutoscalingPolicy( - GetAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listAutoscalingPolicies( - ListAutoscalingPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteAutoscalingPolicy( - DeleteAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} 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 cf367dc6..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterController.java +++ /dev/null @@ -1,57 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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 cf3f06ae..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockClusterControllerImpl.java +++ /dev/null @@ -1,148 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateCluster( - UpdateClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteCluster( - DeleteClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getCluster(GetClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listClusters( - ListClustersRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void diagnoseCluster( - DiagnoseClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} 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 03c81db9..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobController.java +++ /dev/null @@ -1,57 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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 93f5ed54..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockJobControllerImpl.java +++ /dev/null @@ -1,159 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void submitJobAsOperation( - SubmitJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getJob(GetJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listJobs(ListJobsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateJob(UpdateJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void cancelJob(CancelJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteJob(DeleteJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} 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 451a7b0b..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateService.java +++ /dev/null @@ -1,57 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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 74dbcc07..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/MockWorkflowTemplateServiceImpl.java +++ /dev/null @@ -1,167 +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 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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getWorkflowTemplate( - GetWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void instantiateWorkflowTemplate( - InstantiateWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void instantiateInlineWorkflowTemplate( - InstantiateInlineWorkflowTemplateRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateWorkflowTemplate( - UpdateWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listWorkflowTemplates( - ListWorkflowTemplatesRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteWorkflowTemplate( - DeleteWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} 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 86de1d08..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClientTest.java +++ /dev/null @@ -1,496 +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 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.Empty; -import io.grpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -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 org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class WorkflowTemplateServiceClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private WorkflowTemplateServiceClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - WorkflowTemplateServiceSettings settings = - WorkflowTemplateServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowTemplateServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - 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]"); - - Empty actualResponse = client.instantiateWorkflowTemplateAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - (InstantiateWorkflowTemplateRequest) actualRequests.get(0); - - Assert.assertEquals(name, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void instantiateWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void instantiateWorkflowTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateWorkflowTemplateTest2") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - Map parameters = new HashMap<>(); - - Empty actualResponse = client.instantiateWorkflowTemplateAsync(name, parameters).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - (InstantiateWorkflowTemplateRequest) actualRequests.get(0); - - Assert.assertEquals(name, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertEquals(parameters, actualRequest.getParametersMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void instantiateWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - 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); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - Empty actualResponse = client.instantiateInlineWorkflowTemplateAsync(parent, template).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateInlineWorkflowTemplateRequest actualRequest = - (InstantiateInlineWorkflowTemplateRequest) actualRequests.get(0); - - Assert.assertEquals(parent, RegionName.parse(actualRequest.getParent())); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void instantiateInlineWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void createWorkflowTemplateTest() { - String id = "id3355"; - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - int version = 351608024; - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId(id) - .setName(name.toString()) - .setVersion(version) - .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, RegionName.parse(actualRequest.getParent())); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void createWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void getWorkflowTemplateTest() { - String id = "id3355"; - WorkflowTemplateName name2 = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - int version = 351608024; - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId(id) - .setName(name2.toString()) - .setVersion(version) - .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, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void updateWorkflowTemplateTest() { - String id = "id3355"; - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - int version = 351608024; - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId(id) - .setName(name.toString()) - .setVersion(version) - .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 - @SuppressWarnings("all") - public void updateWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void listWorkflowTemplatesTest() { - String nextPageToken = ""; - WorkflowTemplate templatesElement = WorkflowTemplate.newBuilder().build(); - List templates = Arrays.asList(templatesElement); - ListWorkflowTemplatesResponse expectedResponse = - ListWorkflowTemplatesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllTemplates(templates) - .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, RegionName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listWorkflowTemplatesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void deleteWorkflowTemplateTest() { - 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, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - } - } -} 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/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java deleted file mode 100644 index 7b0b70b8..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceClientTest.java +++ /dev/null @@ -1,320 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class AutoscalingPolicyServiceClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private AutoscalingPolicyServiceClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - AutoscalingPolicyServiceSettings settings = - AutoscalingPolicyServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AutoscalingPolicyServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void createAutoscalingPolicyTest() { - String id = "id3355"; - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).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, RegionName.parse(actualRequest.getParent())); - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void createAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void updateAutoscalingPolicyTest() { - String id = "id3355"; - AutoscalingPolicyName name = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder().setId(id).setName(name.toString()).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 - @SuppressWarnings("all") - public void updateAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void getAutoscalingPolicyTest() { - String id = "id3355"; - AutoscalingPolicyName name2 = - AutoscalingPolicyName.ofProjectLocationAutoscalingPolicyName( - "[PROJECT]", "[LOCATION]", "[AUTOSCALING_POLICY]"); - AutoscalingPolicy expectedResponse = - AutoscalingPolicy.newBuilder().setId(id).setName(name2.toString()).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, AutoscalingPolicyName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void listAutoscalingPoliciesTest() { - String nextPageToken = ""; - AutoscalingPolicy policiesElement = AutoscalingPolicy.newBuilder().build(); - List policies = Arrays.asList(policiesElement); - ListAutoscalingPoliciesResponse expectedResponse = - ListAutoscalingPoliciesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllPolicies(policies) - .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, RegionName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listAutoscalingPoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void deleteAutoscalingPolicyTest() { - 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, AutoscalingPolicyName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteAutoscalingPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClientTest.java deleted file mode 100644 index df7d1e24..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerClientTest.java +++ /dev/null @@ -1,481 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class ClusterControllerClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private ClusterControllerClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - ClusterControllerSettings settings = - ClusterControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ClusterControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void createClusterTest() throws Exception { - String projectId2 = "projectId2939242356"; - String clusterName = "clusterName-1018081872"; - String clusterUuid = "clusterUuid-1017854240"; - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId(projectId2) - .setClusterName(clusterName) - .setClusterUuid(clusterUuid) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void createClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void updateClusterTest() throws Exception { - String projectId2 = "projectId2939242356"; - String clusterName2 = "clusterName2875867491"; - String clusterUuid = "clusterUuid-1017854240"; - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId(projectId2) - .setClusterName(clusterName2) - .setClusterUuid(clusterUuid) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - 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 - @SuppressWarnings("all") - public void updateClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - 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 - @SuppressWarnings("all") - 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-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - Empty actualResponse = client.deleteClusterAsync(projectId, region, clusterName).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - 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 - @SuppressWarnings("all") - public void deleteClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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 - @SuppressWarnings("all") - public void diagnoseClusterTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("diagnoseClusterTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockClusterController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - Empty 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 - @SuppressWarnings("all") - public void diagnoseClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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()); - } - } - - @Test - @SuppressWarnings("all") - public void getClusterTest() { - String projectId2 = "projectId2939242356"; - String clusterName2 = "clusterName2875867491"; - String clusterUuid = "clusterUuid-1017854240"; - Cluster expectedResponse = - Cluster.newBuilder() - .setProjectId(projectId2) - .setClusterName(clusterName2) - .setClusterUuid(clusterUuid) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - 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 - @SuppressWarnings("all") - public void getClusterExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String clusterName = "clusterName-1018081872"; - - client.getCluster(projectId, region, clusterName); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listClustersTest() { - String nextPageToken = ""; - Cluster clustersElement = Cluster.newBuilder().build(); - List clusters = Arrays.asList(clustersElement); - ListClustersResponse expectedResponse = - ListClustersResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllClusters(clusters) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listClustersExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listClusters(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listClustersTest2() { - String nextPageToken = ""; - Cluster clustersElement = Cluster.newBuilder().build(); - List clusters = Arrays.asList(clustersElement); - ListClustersResponse expectedResponse = - ListClustersResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllClusters(clusters) - .build(); - mockClusterController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listClustersExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockClusterController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listClusters(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSmokeTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSmokeTest.java deleted file mode 100644 index 23168f9c..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/ClusterControllerSmokeTest.java +++ /dev/null @@ -1,65 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.ClusterControllerClient.ListClustersPagedResponse; - -import com.google.common.base.Preconditions; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class ClusterControllerSmokeTest { - private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT"; - private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT"; - - @Test - public void run() { - main(null); - } - - public static void main(String args[]) { - Logger.getLogger("").setLevel(Level.WARNING); - try { - executeNoCatch(getProjectId()); - System.out.println("OK"); - } catch (Exception e) { - System.err.println("Failed with exception:"); - e.printStackTrace(System.err); - System.exit(1); - } - } - - public static void executeNoCatch(String projectId) throws Exception { - try (ClusterControllerClient client = ClusterControllerClient.create()) { - String projectId2 = projectId; - String region = "global"; - - ListClustersPagedResponse pagedResponse = client.listClusters(projectId2, region); - } - } - - private static String getProjectId() { - String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME)); - if (projectId == null) { - projectId = - System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME)); - } - Preconditions.checkArgument(projectId != null, "A project ID is required."); - return projectId; - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/JobControllerClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/JobControllerClientTest.java deleted file mode 100644 index 0b686f20..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/JobControllerClientTest.java +++ /dev/null @@ -1,545 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class JobControllerClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private JobControllerClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - JobControllerSettings settings = - JobControllerSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = JobControllerClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void submitJobTest() { - String submittedBy = "submittedBy-2047729125"; - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setSubmittedBy(submittedBy) - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void submitJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void submitJobAsOperationTest() throws Exception { - String submittedBy = "submittedBy-2047729125"; - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setSubmittedBy(submittedBy) - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("submitJobAsOperationTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockJobController.addResponse(resultOperation); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void submitJobAsOperationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void getJobTest() { - String submittedBy = "submittedBy-2047729125"; - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setSubmittedBy(submittedBy) - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 - @SuppressWarnings("all") - public void getJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - client.getJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listJobsTest() { - String nextPageToken = ""; - Job jobsElement = Job.newBuilder().build(); - List jobs = Arrays.asList(jobsElement); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listJobsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listJobs(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listJobsTest2() { - String nextPageToken = ""; - Job jobsElement = Job.newBuilder().build(); - List jobs = Arrays.asList(jobsElement); - ListJobsResponse expectedResponse = - ListJobsResponse.newBuilder().setNextPageToken(nextPageToken).addAllJobs(jobs).build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - 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 - @SuppressWarnings("all") - public void listJobsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - - client.listJobs(projectId, region); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void updateJobTest() { - String submittedBy = "submittedBy-2047729125"; - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setSubmittedBy(submittedBy) - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - Job job = Job.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - UpdateJobRequest request = - UpdateJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .setJob(job) - .setUpdateMask(updateMask) - .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(projectId, actualRequest.getProjectId()); - Assert.assertEquals(region, actualRequest.getRegion()); - Assert.assertEquals(jobId, actualRequest.getJobId()); - Assert.assertEquals(job, actualRequest.getJob()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void updateJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - Job job = Job.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - UpdateJobRequest request = - UpdateJobRequest.newBuilder() - .setProjectId(projectId) - .setRegion(region) - .setJobId(jobId) - .setJob(job) - .setUpdateMask(updateMask) - .build(); - - client.updateJob(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void cancelJobTest() { - String submittedBy = "submittedBy-2047729125"; - String driverOutputResourceUri = "driverOutputResourceUri-542229086"; - String driverControlFilesUri = "driverControlFilesUri207057643"; - String jobUuid = "jobUuid-1615012099"; - boolean done = true; - Job expectedResponse = - Job.newBuilder() - .setSubmittedBy(submittedBy) - .setDriverOutputResourceUri(driverOutputResourceUri) - .setDriverControlFilesUri(driverControlFilesUri) - .setJobUuid(jobUuid) - .setDone(done) - .build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 - @SuppressWarnings("all") - public void cancelJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - client.cancelJob(projectId, region, jobId); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void deleteJobTest() { - Empty expectedResponse = Empty.newBuilder().build(); - mockJobController.addResponse(expectedResponse); - - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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 - @SuppressWarnings("all") - public void deleteJobExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockJobController.addException(exception); - - try { - String projectId = "projectId-1969970175"; - String region = "region-934795532"; - String jobId = "jobId-1154752291"; - - 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/v1beta2/MockAutoscalingPolicyService.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockAutoscalingPolicyService.java deleted file mode 100644 index dee2d73d..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockAutoscalingPolicyService.java +++ /dev/null @@ -1,57 +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.v1beta2; - -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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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/v1beta2/MockAutoscalingPolicyServiceImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockAutoscalingPolicyServiceImpl.java deleted file mode 100644 index bf12b9a1..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockAutoscalingPolicyServiceImpl.java +++ /dev/null @@ -1,135 +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.v1beta2; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1beta2.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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateAutoscalingPolicy( - UpdateAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getAutoscalingPolicy( - GetAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listAutoscalingPolicies( - ListAutoscalingPoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteAutoscalingPolicy( - DeleteAutoscalingPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterController.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterController.java deleted file mode 100644 index 43bc081f..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterController.java +++ /dev/null @@ -1,57 +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.v1beta2; - -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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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/v1beta2/MockClusterControllerImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterControllerImpl.java deleted file mode 100644 index c544d367..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockClusterControllerImpl.java +++ /dev/null @@ -1,148 +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.v1beta2; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1beta2.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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateCluster( - UpdateClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteCluster( - DeleteClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getCluster(GetClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listClusters( - ListClustersRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void diagnoseCluster( - DiagnoseClusterRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobController.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobController.java deleted file mode 100644 index 3ed43f60..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobController.java +++ /dev/null @@ -1,57 +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.v1beta2; - -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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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/v1beta2/MockJobControllerImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobControllerImpl.java deleted file mode 100644 index c8c5c0a8..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockJobControllerImpl.java +++ /dev/null @@ -1,159 +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.v1beta2; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1beta2.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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void submitJobAsOperation( - SubmitJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getJob(GetJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listJobs(ListJobsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateJob(UpdateJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void cancelJob(CancelJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteJob(DeleteJobRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateService.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateService.java deleted file mode 100644 index 9e3930bd..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateService.java +++ /dev/null @@ -1,57 +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.v1beta2; - -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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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/v1beta2/MockWorkflowTemplateServiceImpl.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateServiceImpl.java deleted file mode 100644 index e6968e89..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/MockWorkflowTemplateServiceImpl.java +++ /dev/null @@ -1,167 +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.v1beta2; - -import com.google.api.core.BetaApi; -import com.google.cloud.dataproc.v1beta2.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; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -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.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void getWorkflowTemplate( - GetWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void instantiateWorkflowTemplate( - InstantiateWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void instantiateInlineWorkflowTemplate( - InstantiateInlineWorkflowTemplateRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void updateWorkflowTemplate( - UpdateWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void listWorkflowTemplates( - ListWorkflowTemplatesRequest request, - StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } - - @Override - public void deleteWorkflowTemplate( - DeleteWorkflowTemplateRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - 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("Unrecognized response type")); - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java deleted file mode 100644 index 66f0b181..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceClientTest.java +++ /dev/null @@ -1,496 +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.v1beta2; - -import static com.google.cloud.dataproc.v1beta2.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.Empty; -import io.grpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -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 org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class WorkflowTemplateServiceClientTest { - private static MockAutoscalingPolicyService mockAutoscalingPolicyService; - private static MockClusterController mockClusterController; - private static MockJobController mockJobController; - private static MockWorkflowTemplateService mockWorkflowTemplateService; - private static MockServiceHelper serviceHelper; - private WorkflowTemplateServiceClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockAutoscalingPolicyService = new MockAutoscalingPolicyService(); - mockClusterController = new MockClusterController(); - mockJobController = new MockJobController(); - mockWorkflowTemplateService = new MockWorkflowTemplateService(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList( - mockAutoscalingPolicyService, - mockClusterController, - mockJobController, - mockWorkflowTemplateService)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - WorkflowTemplateServiceSettings settings = - WorkflowTemplateServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowTemplateServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - 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]"); - - Empty actualResponse = client.instantiateWorkflowTemplateAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - (InstantiateWorkflowTemplateRequest) actualRequests.get(0); - - Assert.assertEquals(name, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void instantiateWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void instantiateWorkflowTemplateTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("instantiateWorkflowTemplateTest2") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflowTemplateService.addResponse(resultOperation); - - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - Map parameters = new HashMap<>(); - - Empty actualResponse = client.instantiateWorkflowTemplateAsync(name, parameters).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateWorkflowTemplateRequest actualRequest = - (InstantiateWorkflowTemplateRequest) actualRequests.get(0); - - Assert.assertEquals(name, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertEquals(parameters, actualRequest.getParametersMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void instantiateWorkflowTemplateExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - 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); - - RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); - WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); - - Empty actualResponse = client.instantiateInlineWorkflowTemplateAsync(parent, template).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflowTemplateService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - InstantiateInlineWorkflowTemplateRequest actualRequest = - (InstantiateInlineWorkflowTemplateRequest) actualRequests.get(0); - - Assert.assertEquals(parent, RegionName.parse(actualRequest.getParent())); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void instantiateInlineWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void createWorkflowTemplateTest() { - String id = "id3355"; - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - int version = 351608024; - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId(id) - .setName(name.toString()) - .setVersion(version) - .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, RegionName.parse(actualRequest.getParent())); - Assert.assertEquals(template, actualRequest.getTemplate()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void createWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void getWorkflowTemplateTest() { - String id = "id3355"; - WorkflowTemplateName name2 = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - int version = 351608024; - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId(id) - .setName(name2.toString()) - .setVersion(version) - .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, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void updateWorkflowTemplateTest() { - String id = "id3355"; - WorkflowTemplateName name = - WorkflowTemplateName.ofProjectRegionWorkflowTemplateName( - "[PROJECT]", "[REGION]", "[WORKFLOW_TEMPLATE]"); - int version = 351608024; - WorkflowTemplate expectedResponse = - WorkflowTemplate.newBuilder() - .setId(id) - .setName(name.toString()) - .setVersion(version) - .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 - @SuppressWarnings("all") - public void updateWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void listWorkflowTemplatesTest() { - String nextPageToken = ""; - WorkflowTemplate templatesElement = WorkflowTemplate.newBuilder().build(); - List templates = Arrays.asList(templatesElement); - ListWorkflowTemplatesResponse expectedResponse = - ListWorkflowTemplatesResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllTemplates(templates) - .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, RegionName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listWorkflowTemplatesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - @SuppressWarnings("all") - public void deleteWorkflowTemplateTest() { - 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, WorkflowTemplateName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteWorkflowTemplateExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(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 - } - } -} diff --git a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/it/ITSystemTest.java b/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/it/ITSystemTest.java deleted file mode 100644 index 41d167f7..00000000 --- a/google-cloud-dataproc/src/test/java/com/google/cloud/dataproc/v1beta2/it/ITSystemTest.java +++ /dev/null @@ -1,139 +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.v1beta2.it; - -import static org.junit.Assert.assertEquals; - -import com.google.cloud.ServiceOptions; -import com.google.cloud.dataproc.v1beta2.Cluster; -import com.google.cloud.dataproc.v1beta2.ClusterConfig; -import com.google.cloud.dataproc.v1beta2.ClusterControllerClient; -import com.google.cloud.dataproc.v1beta2.ClusterControllerSettings; -import com.google.cloud.dataproc.v1beta2.CreateClusterRequest; -import com.google.cloud.dataproc.v1beta2.EndpointConfig; -import com.google.cloud.dataproc.v1beta2.RegionName; -import com.google.cloud.dataproc.v1beta2.WorkflowTemplate; -import com.google.cloud.dataproc.v1beta2.WorkflowTemplateName; -import com.google.cloud.dataproc.v1beta2.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().setEndpointConfig(EndpointConfig.getDefaultInstance()).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 23742a2b..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 - 1.1.2-SNAPSHOT - grpc-google-cloud-dataproc-v1 - GRPC library for grpc-google-cloud-dataproc-v1 - - com.google.cloud - google-cloud-dataproc-parent - 1.1.2-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 80062108..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceGrpc.java +++ /dev/null @@ -1,888 +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; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * 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") -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) { - 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) { - asyncUnimplementedUnaryCall(getUpdateAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public void getAutoscalingPolicy( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public void listAutoscalingPolicies( - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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) { - asyncUnimplementedUnaryCall(getDeleteAutoscalingPolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy>( - this, METHODID_CREATE_AUTOSCALING_POLICY))) - .addMethod( - getUpdateAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy>( - this, METHODID_UPDATE_AUTOSCALING_POLICY))) - .addMethod( - getGetAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1.AutoscalingPolicy>( - this, METHODID_GET_AUTOSCALING_POLICY))) - .addMethod( - getListAutoscalingPoliciesMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1.ListAutoscalingPoliciesResponse>( - this, METHODID_LIST_AUTOSCALING_POLICIES))) - .addMethod( - getDeleteAutoscalingPolicyMethod(), - 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) { - 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) { - 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) { - 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) { - 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) { - 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 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 blockingUnaryCall( - getChannel(), getUpdateAutoscalingPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public com.google.cloud.dataproc.v1.AutoscalingPolicy getAutoscalingPolicy( - com.google.cloud.dataproc.v1.GetAutoscalingPolicyRequest request) { - return 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 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 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 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 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 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 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 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/ClusterControllerGrpc.java b/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java deleted file mode 100644 index 7a2eb402..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerGrpc.java +++ /dev/null @@ -1,967 +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; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * 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") -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.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) { - 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).
-     * 
- */ - public void updateCluster( - com.google.cloud.dataproc.v1.UpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateClusterMethod(), 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) { - 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) { - 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) { - 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) { - asyncUnimplementedUnaryCall(getDiagnoseClusterMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateClusterRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_CLUSTER))) - .addMethod( - getUpdateClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateClusterRequest, - com.google.longrunning.Operation>(this, METHODID_UPDATE_CLUSTER))) - .addMethod( - getDeleteClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.DeleteClusterRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_CLUSTER))) - .addMethod( - getGetClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetClusterRequest, - com.google.cloud.dataproc.v1.Cluster>(this, METHODID_GET_CLUSTER))) - .addMethod( - getListClustersMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListClustersRequest, - com.google.cloud.dataproc.v1.ListClustersResponse>( - this, METHODID_LIST_CLUSTERS))) - .addMethod( - getDiagnoseClusterMethod(), - 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) { - 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).
-     * 
- */ - public void updateCluster( - com.google.cloud.dataproc.v1.UpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), 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) { - 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) { - 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) { - 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) { - 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 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).
-     * 
- */ - public com.google.longrunning.Operation updateCluster( - com.google.cloud.dataproc.v1.UpdateClusterRequest request) { - return blockingUnaryCall(getChannel(), getUpdateClusterMethod(), 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 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 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 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 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 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).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateCluster(com.google.cloud.dataproc.v1.UpdateClusterRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), 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 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 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 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 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_DELETE_CLUSTER = 2; - private static final int METHODID_GET_CLUSTER = 3; - private static final int METHODID_LIST_CLUSTERS = 4; - private static final int METHODID_DIAGNOSE_CLUSTER = 5; - - 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_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(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 749d4504..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobControllerGrpc.java +++ /dev/null @@ -1,1014 +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; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * The JobController provides methods to manage jobs.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1/jobs.proto") -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) { - asyncUnimplementedUnaryCall(getSubmitJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public void submitJobAsOperation( - com.google.cloud.dataproc.v1.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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) { - 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) { - asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public void updateJob( - com.google.cloud.dataproc.v1.UpdateJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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) { - 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) { - asyncUnimplementedUnaryCall(getDeleteJobMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSubmitJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.SubmitJobRequest, - com.google.cloud.dataproc.v1.Job>(this, METHODID_SUBMIT_JOB))) - .addMethod( - getSubmitJobAsOperationMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.SubmitJobRequest, - com.google.longrunning.Operation>(this, METHODID_SUBMIT_JOB_AS_OPERATION))) - .addMethod( - getGetJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetJobRequest, com.google.cloud.dataproc.v1.Job>( - this, METHODID_GET_JOB))) - .addMethod( - getListJobsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListJobsRequest, - com.google.cloud.dataproc.v1.ListJobsResponse>(this, METHODID_LIST_JOBS))) - .addMethod( - getUpdateJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateJobRequest, - com.google.cloud.dataproc.v1.Job>(this, METHODID_UPDATE_JOB))) - .addMethod( - getCancelJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CancelJobRequest, - com.google.cloud.dataproc.v1.Job>(this, METHODID_CANCEL_JOB))) - .addMethod( - getDeleteJobMethod(), - 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) { - 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) { - 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) { - 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) { - 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) { - 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) { - 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) { - 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 blockingUnaryCall(getChannel(), getSubmitJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public com.google.longrunning.Operation submitJobAsOperation( - com.google.cloud.dataproc.v1.SubmitJobRequest request) { - return 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 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 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 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 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 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 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 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 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 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 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 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 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 72723623..00000000 --- a/grpc-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceGrpc.java +++ /dev/null @@ -1,1261 +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; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * 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") -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) { - 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) { - 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) { - 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) { - 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) { - 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) { - 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) { - asyncUnimplementedUnaryCall(getDeleteWorkflowTemplateMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate>( - this, METHODID_CREATE_WORKFLOW_TEMPLATE))) - .addMethod( - getGetWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate>( - this, METHODID_GET_WORKFLOW_TEMPLATE))) - .addMethod( - getInstantiateWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation>( - this, METHODID_INSTANTIATE_WORKFLOW_TEMPLATE))) - .addMethod( - getInstantiateInlineWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation>( - this, METHODID_INSTANTIATE_INLINE_WORKFLOW_TEMPLATE))) - .addMethod( - getUpdateWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1.WorkflowTemplate>( - this, METHODID_UPDATE_WORKFLOW_TEMPLATE))) - .addMethod( - getListWorkflowTemplatesMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1.ListWorkflowTemplatesResponse>( - this, METHODID_LIST_WORKFLOW_TEMPLATES))) - .addMethod( - getDeleteWorkflowTemplateMethod(), - 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) { - 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) { - 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) { - 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) { - 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) { - 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) { - 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) { - 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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/grpc-google-cloud-dataproc-v1beta2/pom.xml b/grpc-google-cloud-dataproc-v1beta2/pom.xml deleted file mode 100644 index 8d19e96b..00000000 --- a/grpc-google-cloud-dataproc-v1beta2/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-dataproc-v1beta2 - 0.89.2-SNAPSHOT - grpc-google-cloud-dataproc-v1beta2 - GRPC library for grpc-google-cloud-dataproc-v1beta2 - - com.google.cloud - google-cloud-dataproc-parent - 1.1.2-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-v1beta2 - - - 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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceGrpc.java b/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceGrpc.java deleted file mode 100644 index 7bf1eba5..00000000 --- a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyServiceGrpc.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. - */ -package com.google.cloud.dataproc.v1beta2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * The API interface for managing autoscaling policies in the
- * Cloud Dataproc API.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1beta2/autoscaling_policies.proto") -public final class AutoscalingPolicyServiceGrpc { - - private AutoscalingPolicyServiceGrpc() {} - - public static final String SERVICE_NAME = - "google.cloud.dataproc.v1beta2.AutoscalingPolicyService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getCreateAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getCreateAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy - .getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "CreateAutoscalingPolicy")) - .build(); - } - } - } - return getCreateAutoscalingPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getUpdateAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getUpdateAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy - .getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "UpdateAutoscalingPolicy")) - .build(); - } - } - } - return getUpdateAutoscalingPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getGetAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getGetAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy - .getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "GetAutoscalingPolicy")) - .build(); - } - } - } - return getGetAutoscalingPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse> - getListAutoscalingPoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAutoscalingPolicies", - requestType = com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse> - getListAutoscalingPoliciesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AutoscalingPolicyServiceMethodDescriptorSupplier( - "ListAutoscalingPolicies")) - .build(); - } - } - } - return getListAutoscalingPoliciesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest, - com.google.protobuf.Empty> - getDeleteAutoscalingPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteAutoscalingPolicy", - requestType = com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest, - com.google.protobuf.Empty> - getDeleteAutoscalingPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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
-   * Cloud Dataproc API.
-   * 
- */ - public abstract static class AutoscalingPolicyServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates new autoscaling policy.
-     * 
- */ - public void createAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2.UpdateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getUpdateAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public void getAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetAutoscalingPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public void listAutoscalingPolicies( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse> - responseObserver) { - 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.v1beta2.DeleteAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteAutoscalingPolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>( - this, METHODID_CREATE_AUTOSCALING_POLICY))) - .addMethod( - getUpdateAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>( - this, METHODID_UPDATE_AUTOSCALING_POLICY))) - .addMethod( - getGetAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>( - this, METHODID_GET_AUTOSCALING_POLICY))) - .addMethod( - getListAutoscalingPoliciesMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest, - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>( - this, METHODID_LIST_AUTOSCALING_POLICIES))) - .addMethod( - getDeleteAutoscalingPolicyMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_AUTOSCALING_POLICY))) - .build(); - } - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Cloud 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.v1beta2.CreateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2.UpdateAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public void getAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public void listAutoscalingPolicies( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse> - responseObserver) { - 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.v1beta2.DeleteAutoscalingPolicyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteAutoscalingPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Cloud 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.v1beta2.AutoscalingPolicy createAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request) { - return 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.v1beta2.AutoscalingPolicy updateAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateAutoscalingPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request) { - return blockingUnaryCall( - getChannel(), getGetAutoscalingPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse - listAutoscalingPolicies( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request) { - return 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.v1beta2.DeleteAutoscalingPolicyRequest request) { - return blockingUnaryCall( - getChannel(), getDeleteAutoscalingPolicyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * The API interface for managing autoscaling policies in the
-   * Cloud 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.v1beta2.AutoscalingPolicy> - createAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request) { - return 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.v1beta2.AutoscalingPolicy> - updateAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateAutoscalingPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves autoscaling policy.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy> - getAutoscalingPolicy( - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetAutoscalingPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists autoscaling policies in the project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse> - listAutoscalingPolicies( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request) { - return 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.v1beta2.DeleteAutoscalingPolicyRequest request) { - return 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.v1beta2.CreateAutoscalingPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_AUTOSCALING_POLICY: - serviceImpl.updateAutoscalingPolicy( - (com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_AUTOSCALING_POLICY: - serviceImpl.getAutoscalingPolicy( - (com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_AUTOSCALING_POLICIES: - serviceImpl.listAutoscalingPolicies( - (com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>) - responseObserver); - break; - case METHODID_DELETE_AUTOSCALING_POLICY: - serviceImpl.deleteAutoscalingPolicy( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerGrpc.java b/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerGrpc.java deleted file mode 100644 index 7acc1f4a..00000000 --- a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterControllerGrpc.java +++ /dev/null @@ -1,979 +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.v1beta2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * The ClusterControllerService provides methods to manage clusters
- * of Compute Engine instances.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1beta2/clusters.proto") -public final class ClusterControllerGrpc { - - private ClusterControllerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1beta2.ClusterController"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateClusterRequest, com.google.longrunning.Operation> - getCreateClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateCluster", - requestType = com.google.cloud.dataproc.v1beta2.CreateClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateClusterRequest, com.google.longrunning.Operation> - getCreateClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.UpdateClusterRequest, com.google.longrunning.Operation> - getUpdateClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateCluster", - requestType = com.google.cloud.dataproc.v1beta2.UpdateClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest, com.google.longrunning.Operation> - getUpdateClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.DeleteClusterRequest, com.google.longrunning.Operation> - getDeleteClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteCluster", - requestType = com.google.cloud.dataproc.v1beta2.DeleteClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest, com.google.longrunning.Operation> - getDeleteClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.GetClusterRequest, - com.google.cloud.dataproc.v1beta2.Cluster> - getGetClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetCluster", - requestType = com.google.cloud.dataproc.v1beta2.GetClusterRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.Cluster.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetClusterRequest, - com.google.cloud.dataproc.v1beta2.Cluster> - getGetClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetClusterRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("GetCluster")) - .build(); - } - } - } - return getGetClusterMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListClustersRequest, - com.google.cloud.dataproc.v1beta2.ListClustersResponse> - getListClustersMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListClusters", - requestType = com.google.cloud.dataproc.v1beta2.ListClustersRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.ListClustersResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListClustersRequest, - com.google.cloud.dataproc.v1beta2.ListClustersResponse> - getListClustersMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListClustersRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.ListClustersResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new ClusterControllerMethodDescriptorSupplier("ListClusters")) - .build(); - } - } - } - return getListClustersMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest, - com.google.longrunning.Operation> - getDiagnoseClusterMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DiagnoseCluster", - requestType = com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest, - com.google.longrunning.Operation> - getDiagnoseClusterMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public void createCluster( - com.google.cloud.dataproc.v1beta2.CreateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public void updateCluster( - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateClusterMethod(), 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public void deleteCluster( - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public void getCluster( - com.google.cloud.dataproc.v1beta2.GetClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public void listClusters( - com.google.cloud.dataproc.v1beta2.ListClustersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public void diagnoseCluster( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDiagnoseClusterMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.CreateClusterRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_CLUSTER))) - .addMethod( - getUpdateClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest, - com.google.longrunning.Operation>(this, METHODID_UPDATE_CLUSTER))) - .addMethod( - getDeleteClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_CLUSTER))) - .addMethod( - getGetClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.GetClusterRequest, - com.google.cloud.dataproc.v1beta2.Cluster>(this, METHODID_GET_CLUSTER))) - .addMethod( - getListClustersMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.ListClustersRequest, - com.google.cloud.dataproc.v1beta2.ListClustersResponse>( - this, METHODID_LIST_CLUSTERS))) - .addMethod( - getDiagnoseClusterMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public void createCluster( - com.google.cloud.dataproc.v1beta2.CreateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public void updateCluster( - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public void deleteCluster( - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public void getCluster( - com.google.cloud.dataproc.v1beta2.GetClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public void listClusters( - com.google.cloud.dataproc.v1beta2.ListClustersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public void diagnoseCluster( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public com.google.longrunning.Operation createCluster( - com.google.cloud.dataproc.v1beta2.CreateClusterRequest request) { - return 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public com.google.longrunning.Operation updateCluster( - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest request) { - return blockingUnaryCall(getChannel(), getUpdateClusterMethod(), 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public com.google.longrunning.Operation deleteCluster( - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest request) { - return blockingUnaryCall(getChannel(), getDeleteClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.Cluster getCluster( - com.google.cloud.dataproc.v1beta2.GetClusterRequest request) { - return blockingUnaryCall(getChannel(), getGetClusterMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists all regions/{region}/clusters in a project alphabetically.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.ListClustersResponse listClusters( - com.google.cloud.dataproc.v1beta2.ListClustersRequest request) { - return 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.v1beta2#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public com.google.longrunning.Operation diagnoseCluster( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest request) { - return 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createCluster(com.google.cloud.dataproc.v1beta2.CreateClusterRequest request) { - return 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateCluster(com.google.cloud.dataproc.v1beta2.UpdateClusterRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateClusterMethod(), 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.v1beta2#clusteroperationmetadata).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteCluster(com.google.cloud.dataproc.v1beta2.DeleteClusterRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets the resource representation for a cluster in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1beta2.Cluster> - getCluster(com.google.cloud.dataproc.v1beta2.GetClusterRequest request) { - return 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.v1beta2.ListClustersResponse> - listClusters(com.google.cloud.dataproc.v1beta2.ListClustersRequest request) { - return 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.v1beta2#clusteroperationmetadata).
-     * After the operation completes,
-     * [Operation.response][google.longrunning.Operation.response]
-     * contains
-     * [Empty][google.protobuf.Empty].
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - diagnoseCluster(com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest request) { - return 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_DELETE_CLUSTER = 2; - private static final int METHODID_GET_CLUSTER = 3; - private static final int METHODID_LIST_CLUSTERS = 4; - private static final int METHODID_DIAGNOSE_CLUSTER = 5; - - 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.v1beta2.CreateClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_CLUSTER: - serviceImpl.updateCluster( - (com.google.cloud.dataproc.v1beta2.UpdateClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_CLUSTER: - serviceImpl.deleteCluster( - (com.google.cloud.dataproc.v1beta2.DeleteClusterRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_CLUSTER: - serviceImpl.getCluster( - (com.google.cloud.dataproc.v1beta2.GetClusterRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_CLUSTERS: - serviceImpl.listClusters( - (com.google.cloud.dataproc.v1beta2.ListClustersRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DIAGNOSE_CLUSTER: - serviceImpl.diagnoseCluster( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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(getDeleteClusterMethod()) - .addMethod(getGetClusterMethod()) - .addMethod(getListClustersMethod()) - .addMethod(getDiagnoseClusterMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerGrpc.java b/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerGrpc.java deleted file mode 100644 index b0fdbc1f..00000000 --- a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobControllerGrpc.java +++ /dev/null @@ -1,1030 +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.v1beta2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * The JobController provides methods to manage jobs.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1beta2/jobs.proto") -public final class JobControllerGrpc { - - private JobControllerGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1beta2.JobController"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getSubmitJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SubmitJob", - requestType = com.google.cloud.dataproc.v1beta2.SubmitJobRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getSubmitJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("SubmitJob")) - .build(); - } - } - } - return getSubmitJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, com.google.longrunning.Operation> - getSubmitJobAsOperationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "SubmitJobAsOperation", - requestType = com.google.cloud.dataproc.v1beta2.SubmitJobRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, com.google.longrunning.Operation> - getSubmitJobAsOperationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.GetJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getGetJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetJob", - requestType = com.google.cloud.dataproc.v1beta2.GetJobRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getGetJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetJobRequest, com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("GetJob")) - .build(); - } - } - } - return getGetJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListJobsRequest, - com.google.cloud.dataproc.v1beta2.ListJobsResponse> - getListJobsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListJobs", - requestType = com.google.cloud.dataproc.v1beta2.ListJobsRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.ListJobsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListJobsRequest, - com.google.cloud.dataproc.v1beta2.ListJobsResponse> - getListJobsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListJobsRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.ListJobsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("ListJobs")) - .build(); - } - } - } - return getListJobsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getUpdateJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateJob", - requestType = com.google.cloud.dataproc.v1beta2.UpdateJobRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getUpdateJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateJobRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("UpdateJob")) - .build(); - } - } - } - return getUpdateJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CancelJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getCancelJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CancelJob", - requestType = com.google.cloud.dataproc.v1beta2.CancelJobRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.Job.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CancelJobRequest, com.google.cloud.dataproc.v1beta2.Job> - getCancelJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CancelJobRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance())) - .setSchemaDescriptor(new JobControllerMethodDescriptorSupplier("CancelJob")) - .build(); - } - } - } - return getCancelJobMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteJobRequest, com.google.protobuf.Empty> - getDeleteJobMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteJob", - requestType = com.google.cloud.dataproc.v1beta2.DeleteJobRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteJobRequest, com.google.protobuf.Empty> - getDeleteJobMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getSubmitJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public void submitJobAsOperation( - com.google.cloud.dataproc.v1beta2.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getSubmitJobAsOperationMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public void getJob( - com.google.cloud.dataproc.v1beta2.GetJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetJobMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public void listJobs( - com.google.cloud.dataproc.v1beta2.ListJobsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListJobsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public void updateJob( - com.google.cloud.dataproc.v1beta2.UpdateJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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/v1beta2/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
-     * 
- */ - public void cancelJob( - com.google.cloud.dataproc.v1beta2.CancelJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.DeleteJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteJobMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSubmitJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, - com.google.cloud.dataproc.v1beta2.Job>(this, METHODID_SUBMIT_JOB))) - .addMethod( - getSubmitJobAsOperationMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.SubmitJobRequest, - com.google.longrunning.Operation>(this, METHODID_SUBMIT_JOB_AS_OPERATION))) - .addMethod( - getGetJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.GetJobRequest, - com.google.cloud.dataproc.v1beta2.Job>(this, METHODID_GET_JOB))) - .addMethod( - getListJobsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.ListJobsRequest, - com.google.cloud.dataproc.v1beta2.ListJobsResponse>( - this, METHODID_LIST_JOBS))) - .addMethod( - getUpdateJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.UpdateJobRequest, - com.google.cloud.dataproc.v1beta2.Job>(this, METHODID_UPDATE_JOB))) - .addMethod( - getCancelJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.CancelJobRequest, - com.google.cloud.dataproc.v1beta2.Job>(this, METHODID_CANCEL_JOB))) - .addMethod( - getDeleteJobMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getSubmitJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public void submitJobAsOperation( - com.google.cloud.dataproc.v1beta2.SubmitJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getSubmitJobAsOperationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public void getJob( - com.google.cloud.dataproc.v1beta2.GetJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetJobMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public void listJobs( - com.google.cloud.dataproc.v1beta2.ListJobsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListJobsMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public void updateJob( - com.google.cloud.dataproc.v1beta2.UpdateJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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/v1beta2/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
-     * 
- */ - public void cancelJob( - com.google.cloud.dataproc.v1beta2.CancelJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.DeleteJobRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.Job submitJob( - com.google.cloud.dataproc.v1beta2.SubmitJobRequest request) { - return blockingUnaryCall(getChannel(), getSubmitJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public com.google.longrunning.Operation submitJobAsOperation( - com.google.cloud.dataproc.v1beta2.SubmitJobRequest request) { - return blockingUnaryCall( - getChannel(), getSubmitJobAsOperationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets the resource representation for a job in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.Job getJob( - com.google.cloud.dataproc.v1beta2.GetJobRequest request) { - return blockingUnaryCall(getChannel(), getGetJobMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.ListJobsResponse listJobs( - com.google.cloud.dataproc.v1beta2.ListJobsRequest request) { - return blockingUnaryCall(getChannel(), getListJobsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.Job updateJob( - com.google.cloud.dataproc.v1beta2.UpdateJobRequest request) { - return 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/v1beta2/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.Job cancelJob( - com.google.cloud.dataproc.v1beta2.CancelJobRequest request) { - return 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.v1beta2.DeleteJobRequest request) { - return 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.v1beta2.SubmitJobRequest request) { - return futureUnaryCall(getChannel().newCall(getSubmitJobMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Submits job to a cluster.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - submitJobAsOperation(com.google.cloud.dataproc.v1beta2.SubmitJobRequest request) { - return 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.v1beta2.GetJobRequest request) { - return futureUnaryCall(getChannel().newCall(getGetJobMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists regions/{region}/jobs in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.dataproc.v1beta2.ListJobsResponse> - listJobs(com.google.cloud.dataproc.v1beta2.ListJobsRequest request) { - return futureUnaryCall(getChannel().newCall(getListJobsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a job in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateJob(com.google.cloud.dataproc.v1beta2.UpdateJobRequest request) { - return 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/v1beta2/projects.regions.jobs/list)
-     * or
-     * [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - cancelJob(com.google.cloud.dataproc.v1beta2.CancelJobRequest request) { - return 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.v1beta2.DeleteJobRequest request) { - return 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.v1beta2.SubmitJobRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_SUBMIT_JOB_AS_OPERATION: - serviceImpl.submitJobAsOperation( - (com.google.cloud.dataproc.v1beta2.SubmitJobRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_JOB: - serviceImpl.getJob( - (com.google.cloud.dataproc.v1beta2.GetJobRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_JOBS: - serviceImpl.listJobs( - (com.google.cloud.dataproc.v1beta2.ListJobsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_JOB: - serviceImpl.updateJob( - (com.google.cloud.dataproc.v1beta2.UpdateJobRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CANCEL_JOB: - serviceImpl.cancelJob( - (com.google.cloud.dataproc.v1beta2.CancelJobRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_JOB: - serviceImpl.deleteJob( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java b/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java deleted file mode 100644 index 0aeb05ba..00000000 --- a/grpc-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateServiceGrpc.java +++ /dev/null @@ -1,1272 +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.v1beta2; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * The API interface for managing Workflow Templates in the
- * Dataproc API.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/dataproc/v1beta2/workflow_templates.proto") -public final class WorkflowTemplateServiceGrpc { - - private WorkflowTemplateServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.dataproc.v1beta2.WorkflowTemplateService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate> - getCreateWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.WorkflowTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate> - getCreateWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.WorkflowTemplate - .getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "CreateWorkflowTemplate")) - .build(); - } - } - } - return getCreateWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate> - getGetWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.WorkflowTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate> - getGetWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.WorkflowTemplate - .getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "GetWorkflowTemplate")) - .build(); - } - } - } - return getGetWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "InstantiateWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateInlineWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "InstantiateInlineWorkflowTemplate", - requestType = - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation> - getInstantiateInlineWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2 - .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.v1beta2.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate> - getUpdateWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.WorkflowTemplate.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate> - getUpdateWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.WorkflowTemplate - .getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "UpdateWorkflowTemplate")) - .build(); - } - } - } - return getUpdateWorkflowTemplateMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse> - getListWorkflowTemplatesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListWorkflowTemplates", - requestType = com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest.class, - responseType = com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse> - getListWorkflowTemplatesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new WorkflowTemplateServiceMethodDescriptorSupplier( - "ListWorkflowTemplates")) - .build(); - } - } - } - return getListWorkflowTemplatesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest, - com.google.protobuf.Empty> - getDeleteWorkflowTemplateMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteWorkflowTemplate", - requestType = com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest, - com.google.protobuf.Empty> - getDeleteWorkflowTemplateMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2.GetWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2#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.v1beta2.InstantiateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getInstantiateWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.UpdateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getUpdateWorkflowTemplateMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public void listWorkflowTemplates( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListWorkflowTemplatesMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow template. It does not cancel in-progress workflows.
-     * 
- */ - public void deleteWorkflowTemplate( - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteWorkflowTemplateMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate>( - this, METHODID_CREATE_WORKFLOW_TEMPLATE))) - .addMethod( - getGetWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate>( - this, METHODID_GET_WORKFLOW_TEMPLATE))) - .addMethod( - getInstantiateWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest, - com.google.longrunning.Operation>( - this, METHODID_INSTANTIATE_WORKFLOW_TEMPLATE))) - .addMethod( - getInstantiateInlineWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest, - com.google.longrunning.Operation>( - this, METHODID_INSTANTIATE_INLINE_WORKFLOW_TEMPLATE))) - .addMethod( - getUpdateWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate>( - this, METHODID_UPDATE_WORKFLOW_TEMPLATE))) - .addMethod( - getListWorkflowTemplatesMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest, - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse>( - this, METHODID_LIST_WORKFLOW_TEMPLATES))) - .addMethod( - getDeleteWorkflowTemplateMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2.GetWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2#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.v1beta2.InstantiateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.UpdateWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateWorkflowTemplateMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public void listWorkflowTemplates( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - 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.v1beta2.DeleteWorkflowTemplateRequest request, - io.grpc.stub.StreamObserver responseObserver) { - 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.v1beta2.WorkflowTemplate createWorkflowTemplate( - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest request) { - return 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.v1beta2.WorkflowTemplate getWorkflowTemplate( - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest request) { - return 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.v1beta2#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.v1beta2.InstantiateWorkflowTemplateRequest request) { - return blockingUnaryCall( - getChannel(), getInstantiateWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest request) { - return 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.v1beta2.WorkflowTemplate updateWorkflowTemplate( - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateWorkflowTemplateMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists workflows that match the specified filter in the request.
-     * 
- */ - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse listWorkflowTemplates( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest request) { - return 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.v1beta2.DeleteWorkflowTemplateRequest request) { - return 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.v1beta2.WorkflowTemplate> - createWorkflowTemplate( - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest request) { - return 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.v1beta2.WorkflowTemplate> - getWorkflowTemplate(com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest request) { - return 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.v1beta2#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.v1beta2.InstantiateWorkflowTemplateRequest request) { - return futureUnaryCall( - getChannel().newCall(getInstantiateWorkflowTemplateMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Instantiates a template and begins execution.
-     * This method is equivalent to executing the sequence
-     * [CreateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate],
-     * [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest request) { - return 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.v1beta2.WorkflowTemplate> - updateWorkflowTemplate( - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest request) { - return 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.v1beta2.ListWorkflowTemplatesResponse> - listWorkflowTemplates( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest request) { - return 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.v1beta2.DeleteWorkflowTemplateRequest request) { - return 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.v1beta2.CreateWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_WORKFLOW_TEMPLATE: - serviceImpl.getWorkflowTemplate( - (com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_INSTANTIATE_WORKFLOW_TEMPLATE: - serviceImpl.instantiateWorkflowTemplate( - (com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_INSTANTIATE_INLINE_WORKFLOW_TEMPLATE: - serviceImpl.instantiateInlineWorkflowTemplate( - (com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_WORKFLOW_TEMPLATE: - serviceImpl.updateWorkflowTemplate( - (com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_WORKFLOW_TEMPLATES: - serviceImpl.listWorkflowTemplates( - (com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse>) - responseObserver); - break; - case METHODID_DELETE_WORKFLOW_TEMPLATE: - serviceImpl.deleteWorkflowTemplate( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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 3a9b503a..00000000 --- a/java.header +++ /dev/null @@ -1,15 +0,0 @@ -^/\*$ -^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ -^ \*$ -^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ -^ \* you may not use this file except in compliance with the License\.$ -^ \* You may obtain a copy of the License at$ -^ \*$ -^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ -^ \*$ -^ \* Unless required by applicable law or agreed to in writing, software$ -^ \* distributed under the License is distributed on an "AS IS" BASIS,$ -^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ -^ \* See the License for the specific language governing permissions and$ -^ \* limitations under the License\.$ -^ \*/$ diff --git a/license-checks.xml b/license-checks.xml deleted file mode 100644 index 6597fced..00000000 --- a/license-checks.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 6926ace1..00000000 --- a/pom.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-dataproc-parent - pom - 1.1.2-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 - 0.9.2 - - - - - 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 - - - - sonatype-nexus-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - - sonatype-nexus-staging - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - - 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-v1beta2 - 0.89.2-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-dataproc-v1 - 1.1.2-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1 - 1.1.2-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-dataproc-v1beta2 - 0.89.2-SNAPSHOT - - - com.google.cloud - google-cloud-dataproc - 1.1.2-SNAPSHOT - - - - com.google.cloud - google-cloud-shared-dependencies - 0.10.0 - pom - import - - - - junit - junit - 4.13 - test - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - org.objenesis:objenesis - javax.annotation:javax.annotation-api - - - - - - - - - proto-google-cloud-dataproc-v1beta2 - proto-google-cloud-dataproc-v1 - grpc-google-cloud-dataproc-v1 - grpc-google-cloud-dataproc-v1beta2 - google-cloud-dataproc - google-cloud-dataproc-bom - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 3.1.1 - - - - index - dependency-info - team - ci-management - issue-management - licenses - scm - dependency-management - distribution-management - summary - modules - - - - - true - ${site.installationModule} - jar - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - - html - - aggregate - javadoc - - - - - none - protected - true - ${project.build.directory}/javadoc - - - Test helpers packages - com.google.cloud.testing - - - SPI packages - com.google.cloud.spi* - - - - - https://grpc.io/grpc-java/javadoc/ - https://developers.google.com/protocol-buffers/docs/reference/java/ - https://googleapis.dev/java/google-auth-library/latest/ - https://googleapis.dev/java/gax/latest/ - https://googleapis.github.io/api-common-java/ - - - - - - \ No newline at end of file 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 fa53d8b6..00000000 --- a/proto-google-cloud-dataproc-v1/clirr-ignored-differences.xml +++ /dev/null @@ -1,19 +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*(*) - - diff --git a/proto-google-cloud-dataproc-v1/pom.xml b/proto-google-cloud-dataproc-v1/pom.xml deleted file mode 100644 index 203019d6..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 - 1.1.2-SNAPSHOT - proto-google-cloud-dataproc-v1 - PROTO library for proto-google-cloud-dataproc-v1 - - com.google.cloud - google-cloud-dataproc-parent - 1.1.2-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 f54ba2c5..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 (!getAcceleratorTypeUriBytes().isEmpty()) { - 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 (!getAcceleratorTypeUriBytes().isEmpty()) { - 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 9fe69ff9..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 (!getPolicyUriBytes().isEmpty()) { - 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 (!getPolicyUriBytes().isEmpty()) { - 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 7dda762c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPoliciesProto.java +++ /dev/null @@ -1,290 +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_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\"\250\004\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:\317\001\352A\313\001\n)data" - + "proc.googleapis.com/AutoscalingPolicy\022Pp" - + "rojects/{project}/locations/{location}/a" - + "utoscalingPolicies/{autoscaling_policy}\022" - + "Lprojects/{project}/regions/{region}/aut" - + "oscalingPolicies/{autoscaling_policy}B\013\n" - + "\talgorithm\"\244\001\n\031BasicAutoscalingAlgorithm" - + "\022N\n\013yarn_config\030\001 \001(\01324.google.cloud.dat" - + "aproc.v1.BasicYarnAutoscalingConfigB\003\340A\002" - + "\0227\n\017cooldown_period\030\002 \001(\0132\031.google.proto" - + "buf.DurationB\003\340A\001\"\371\001\n\032BasicYarnAutoscali" - + "ngConfig\022E\n\035graceful_decommission_timeou" - + "t\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\021scale_d" - + "own_factor\030\002 \001(\001B\003\340A\002\022)\n\034scale_up_min_wo" - + "rker_fraction\030\003 \001(\001B\003\340A\001\022+\n\036scale_down_m" - + "in_worker_fraction\030\004 \001(\001B\003\340A\001\"s\n$Instanc" - + "eGroupAutoscalingPolicyConfig\022\032\n\rmin_ins" - + "tances\030\001 \001(\005B\003\340A\001\022\032\n\rmax_instances\030\002 \001(\005" - + "B\003\340A\002\022\023\n\006weight\030\003 \001(\005B\003\340A\001\"\245\001\n\036CreateAut" - + "oscalingPolicyRequest\022A\n\006parent\030\001 \001(\tB1\340" - + "A\002\372A+\022)dataproc.googleapis.com/Autoscali" - + "ngPolicy\022@\n\006policy\030\002 \001(\0132+.google.cloud." - + "dataproc.v1.AutoscalingPolicyB\003\340A\002\"^\n\033Ge" - + "tAutoscalingPolicyRequest\022?\n\004name\030\001 \001(\tB" - + "1\340A\002\372A+\n)dataproc.googleapis.com/Autosca" - + "lingPolicy\"b\n\036UpdateAutoscalingPolicyReq" - + "uest\022@\n\006policy\030\001 \001(\0132+.google.cloud.data" - + "proc.v1.AutoscalingPolicyB\003\340A\002\"a\n\036Delete" - + "AutoscalingPolicyRequest\022?\n\004name\030\001 \001(\tB1" - + "\340A\002\372A+\n)dataproc.googleapis.com/Autoscal" - + "ingPolicy\"\224\001\n\036ListAutoscalingPoliciesReq" - + "uest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)dataproc.g" - + "oogleapis.com/AutoscalingPolicy\022\026\n\tpage_" - + "size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001" - + "\"\203\001\n\037ListAutoscalingPoliciesResponse\022B\n\010" - + "policies\030\001 \003(\0132+.google.cloud.dataproc.v" - + "1.AutoscalingPolicyB\003\340A\003\022\034\n\017next_page_to" - + "ken\030\002 \001(\tB\003\340A\0032\256\013\n\030AutoscalingPolicyServ" - + "ice\022\234\002\n\027CreateAutoscalingPolicy\0228.google" - + ".cloud.dataproc.v1.CreateAutoscalingPoli" - + "cyRequest\032+.google.cloud.dataproc.v1.Aut" - + "oscalingPolicy\"\231\001\202\323\344\223\002\202\001\"7/v1/{parent=pr" - + "ojects/*/locations/*}/autoscalingPolicie" - + "s:\006policyZ?\"5/v1/{parent=projects/*/regi" - + "ons/*}/autoscalingPolicies:\006policy\332A\rpar" - + "ent,policy\022\243\002\n\027UpdateAutoscalingPolicy\0228" - + ".google.cloud.dataproc.v1.UpdateAutoscal" - + "ingPolicyRequest\032+.google.cloud.dataproc" - + ".v1.AutoscalingPolicy\"\240\001\202\323\344\223\002\220\001\032>/v1/{po" - + "licy.name=projects/*/locations/*/autosca" - + "lingPolicies/*}:\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(); - } - 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; - } - 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; - } - - @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(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!getNameBytes().isEmpty()) { - 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()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!getNameBytes().isEmpty()) { - 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()); - } - 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 (!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(); - } - 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; - } - - @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; - } - 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); - 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.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()); - } - 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 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_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 f93a19bd..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyName.java +++ /dev/null @@ -1,363 +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 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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class AutoscalingPolicyName implements ResourceName { - - @Deprecated - protected AutoscalingPolicyName() {} - - private static final PathTemplate PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}"); - private static final PathTemplate PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}"); - - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - - private String project; - private String location; - private String autoscalingPolicy; - private String region; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getAutoscalingPolicy() { - return autoscalingPolicy; - } - - public String getRegion() { - return region; - } - - private AutoscalingPolicyName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy()); - pathTemplate = PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE; - } - - private AutoscalingPolicyName(ProjectRegionAutoscalingPolicyBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy()); - pathTemplate = PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE; - } - - 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 newProjectLocationAutoscalingPolicyBuilder() - .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 newProjectLocationAutoscalingPolicyBuilder() - .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_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString); - return ofProjectLocationAutoscalingPolicyName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("autoscaling_policy")); - } else if (PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString); - return ofProjectRegionAutoscalingPolicyName( - matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy")); - } - throw new ValidationException("JobName.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_PATH_TEMPLATE.matches(formattedString) - || PROJECT_REGION_AUTOSCALING_POLICY_PATH_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 (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()); - } - - /** - * 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( - autoscalingPolicyName.pathTemplate == PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE, - "toBuilder is only supported when AutoscalingPolicyName has the pattern of " - + "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}."); - project = autoscalingPolicyName.project; - location = autoscalingPolicyName.location; - 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; - - private 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); - } - } - - @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; - } -} 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 2e0dbd53..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyOrBuilder.java +++ /dev/null @@ -1,204 +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(); - - 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/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/CancelJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CancelJobRequest.java deleted file mode 100644 index af5f45b3..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 63da7b8b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Cluster.java +++ /dev/null @@ -1,2875 +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 cluster of Compute Engine instances.
- * 
- * - * 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; - } - 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_; - /** - * - * - *
-   * Required. The cluster config. 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) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * Required. The cluster config. 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) = 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 config. 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) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - 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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (config_ != null) { - output.writeMessage(3, getConfig()); - } - if (status_ != null) { - output.writeMessage(4, getStatus()); - } - if (!getClusterUuidBytes().isEmpty()) { - 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()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterUuidBytes().isEmpty()) { - 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()); - } - 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 (!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 (!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 cluster of Compute Engine instances.
-   * 
- * - * 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; - } - 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(); - } - 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()); - } - 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_; - /** - * - * - *
-     * Required. The cluster config. 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) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * Required. The cluster config. 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) = 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 config. 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) = 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 config. 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) = 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 config. 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) = 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 config. 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) = REQUIRED]; - * - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The cluster config. 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) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1.ClusterConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The cluster config. 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) = 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 config. 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) = 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 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 4e903d22..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfig.java +++ /dev/null @@ -1,4827 +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; - } - 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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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.
-   * 
- * - * 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.
-   * 
- * - * 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 master instance in a cluster.
-   * 
- * - * - * .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 master instance in a cluster.
-   * 
- * - * - * .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 master instance in a cluster.
-   * 
- * - * - * .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
-   * worker instances in a cluster.
-   * 
- * - * - * .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
-   * worker instances in a cluster.
-   * 
- * - * - * .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
-   * worker instances in a cluster.
-   * 
- * - * - * .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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .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 software inside the cluster.
-   * 
- * - * - * .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 software inside the cluster.
-   * 
- * - * - * .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 software inside the cluster.
-   * 
- * - * - * .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(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getConfigBucketBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, configBucket_); - } - if (!getTempBucketBytes().isEmpty()) { - 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()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getConfigBucketBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, configBucket_); - } - if (!getTempBucketBytes().isEmpty()) { - 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()); - } - 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 (!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(); - } - 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; - } - 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(); - } - 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()); - } - 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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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.
-     * 
- * - * 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.
-     * 
- * - * 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.
-     * 
- * - * 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.
-     * 
- * - * 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.
-     * 
- * - * 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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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 master instance in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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 software inside the cluster.
-     * 
- * - * - * .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_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 faec0811..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterConfigOrBuilder.java +++ /dev/null @@ -1,651 +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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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.
-   * 
- * - * 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.
-   * 
- * - * 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 master instance in a cluster.
-   * 
- * - * - * .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 master instance in a cluster.
-   * 
- * - * - * .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 master instance in a cluster.
-   * 
- * - * - * .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
-   * worker instances in a cluster.
-   * 
- * - * - * .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
-   * worker instances in a cluster.
-   * 
- * - * - * .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
-   * worker instances in a cluster.
-   * 
- * - * - * .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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .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 software inside the cluster.
-   * 
- * - * - * .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 software inside the cluster.
-   * 
- * - * - * .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 software inside the cluster.
-   * 
- * - * - * .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(); -} 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 cda13552..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 (!getOperationIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operationId_); - } - if (!getErrorBytes().isEmpty()) { - 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 (!getOperationIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operationId_); - } - if (!getErrorBytes().isEmpty()) { - 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 a8812698..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 (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - 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 (!getOperationTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, operationType_); - } - if (!getDescriptionBytes().isEmpty()) { - 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 (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - 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 (!getOperationTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, operationType_); - } - if (!getDescriptionBytes().isEmpty()) { - 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 befce0c5..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 (!getInnerStateBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, innerState_); - } - if (!getDetailsBytes().isEmpty()) { - 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 (!getInnerStateBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, innerState_); - } - if (!getDetailsBytes().isEmpty()) { - 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 daaa60c4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterOrBuilder.java +++ /dev/null @@ -1,382 +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(); - - /** - * - * - *
-   * Required. The cluster config. 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) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - * - * - *
-   * Required. The cluster config. 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) = REQUIRED]; - * - * - * @return The config. - */ - com.google.cloud.dataproc.v1.ClusterConfig getConfig(); - /** - * - * - *
-   * Required. The cluster config. 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) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1.ClusterConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * 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 827e43c1..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 (!getZoneBytes().isEmpty()) { - 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 (!getZoneBytes().isEmpty()) { - 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 f3906534..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClusterStatus.java +++ /dev/null @@ -1,1691 +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.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The cluster encountered an error. It is not ready for use.
-     * 
- * - * ERROR = 3; - */ - ERROR(3), - /** - * - * - *
-     * 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), - 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.
-     * 
- * - * 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 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; - - 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 4: - return DELETING; - case 5: - return UPDATING; - 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 (!getDetailBytes().isEmpty()) { - 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 (!getDetailBytes().isEmpty()) { - 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 b4e41d27..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ClustersProto.java +++ /dev/null @@ -1,725 +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_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_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_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_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_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%goo" - + "gle/cloud/dataproc/v1/shared.proto\032#goog" - + "le/longrunning/operations.proto\032\036google/" - + "protobuf/duration.proto\032 google/protobuf" - + "/field_mask.proto\032\037google/protobuf/times" - + "tamp.proto\"\315\003\n\007Cluster\022\027\n\nproject_id\030\001 \001" - + "(\tB\003\340A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\022<\n\006co" - + "nfig\030\003 \001(\0132\'.google.cloud.dataproc.v1.Cl" - + "usterConfigB\003\340A\002\022B\n\006labels\030\010 \003(\0132-.googl" - + "e.cloud.dataproc.v1.Cluster.LabelsEntryB" - + "\003\340A\001\022<\n\006status\030\004 \001(\0132\'.google.cloud.data" - + "proc.v1.ClusterStatusB\003\340A\003\022D\n\016status_his" - + "tory\030\007 \003(\0132\'.google.cloud.dataproc.v1.Cl" - + "usterStatusB\003\340A\003\022\031\n\014cluster_uuid\030\006 \001(\tB\003" - + "\340A\003\022>\n\007metrics\030\t \001(\0132(.google.cloud.data" - + "proc.v1.ClusterMetricsB\003\340A\003\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\222\007\n\rC" - + "lusterConfig\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_cluste" - + "r_config\030\010 \001(\0132*.google.cloud.dataproc.v" - + "1.GceClusterConfigB\003\340A\001\022I\n\rmaster_config" - + "\030\t \001(\0132-.google.cloud.dataproc.v1.Instan" - + "ceGroupConfigB\003\340A\001\022I\n\rworker_config\030\n \001(" - + "\0132-.google.cloud.dataproc.v1.InstanceGro" - + "upConfigB\003\340A\001\022S\n\027secondary_worker_config" - + "\030\014 \001(\0132-.google.cloud.dataproc.v1.Instan" - + "ceGroupConfigB\003\340A\001\022F\n\017software_config\030\r " - + "\001(\0132(.google.cloud.dataproc.v1.SoftwareC" - + "onfigB\003\340A\001\022W\n\026initialization_actions\030\013 \003" - + "(\01322.google.cloud.dataproc.v1.NodeInitia" - + "lizationActionB\003\340A\001\022J\n\021encryption_config" - + "\030\017 \001(\0132*.google.cloud.dataproc.v1.Encryp" - + "tionConfigB\003\340A\001\022L\n\022autoscaling_config\030\022 " - + "\001(\0132+.google.cloud.dataproc.v1.Autoscali" - + "ngConfigB\003\340A\001\022F\n\017security_config\030\020 \001(\0132(" - + ".google.cloud.dataproc.v1.SecurityConfig" - + "B\003\340A\001\022H\n\020lifecycle_config\030\021 \001(\0132).google" - + ".cloud.dataproc.v1.LifecycleConfigB\003\340A\001\022" - + "F\n\017endpoint_config\030\023 \001(\0132(.google.cloud." - + "dataproc.v1.EndpointConfigB\003\340A\001\"\272\001\n\016Endp" - + "ointConfig\022P\n\nhttp_ports\030\001 \003(\01327.google." - + "cloud.dataproc.v1.EndpointConfig.HttpPor" - + "tsEntryB\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\005value\030\002 \001(\t:\0028\001\",\n\021AutoscalingConfi" - + "g\022\027\n\npolicy_uri\030\001 \001(\tB\003\340A\001\"4\n\020Encryption" - + "Config\022 \n\023gce_pd_kms_key_name\030\001 \001(\tB\003\340A\001" - + "\"\237\003\n\020GceClusterConfig\022\025\n\010zone_uri\030\001 \001(\tB" - + "\003\340A\001\022\030\n\013network_uri\030\002 \001(\tB\003\340A\001\022\033\n\016subnet" - + "work_uri\030\006 \001(\tB\003\340A\001\022\035\n\020internal_ip_only\030" - + "\007 \001(\010B\003\340A\001\022\034\n\017service_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\010metadata\030\005 \003(\01328.google.c" - + "loud.dataproc.v1.GceClusterConfig.Metada" - + "taEntry\022P\n\024reservation_affinity\030\013 \001(\0132-." - + "google.cloud.dataproc.v1.ReservationAffi" - + "nityB\003\340A\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001\"\315\004\n\023InstanceGroupConf" - + "ig\022\032\n\rnum_instances\030\001 \001(\005B\003\340A\001\022\033\n\016instan" - + "ce_names\030\002 \003(\tB\003\340A\003\022\026\n\timage_uri\030\003 \001(\tB\003" - + "\340A\001\022\035\n\020machine_type_uri\030\004 \001(\tB\003\340A\001\022>\n\013di" - + "sk_config\030\005 \001(\0132$.google.cloud.dataproc." - + "v1.DiskConfigB\003\340A\001\022\033\n\016is_preemptible\030\006 \001" - + "(\010B\003\340A\003\022Y\n\016preemptibility\030\n \001(\0162<.google" - + ".cloud.dataproc.v1.InstanceGroupConfig.P" - + "reemptibilityB\003\340A\001\022O\n\024managed_group_conf" - + "ig\030\007 \001(\0132,.google.cloud.dataproc.v1.Mana" - + "gedGroupConfigB\003\340A\003\022F\n\014accelerators\030\010 \003(" - + "\0132+.google.cloud.dataproc.v1.Accelerator" - + "ConfigB\003\340A\001\022\035\n\020min_cpu_platform\030\t \001(\tB\003\340" - + "A\001\"V\n\016Preemptibility\022\036\n\032PREEMPTIBILITY_U" - + "NSPECIFIED\020\000\022\023\n\017NON_PREEMPTIBLE\020\001\022\017\n\013PRE" - + "EMPTIBLE\020\002\"c\n\022ManagedGroupConfig\022#\n\026inst" - + "ance_template_name\030\001 \001(\tB\003\340A\003\022(\n\033instanc" - + "e_group_manager_name\030\002 \001(\tB\003\340A\003\"L\n\021Accel" - + "eratorConfig\022\034\n\024accelerator_type_uri\030\001 \001" - + "(\t\022\031\n\021accelerator_count\030\002 \001(\005\"f\n\nDiskCon" - + "fig\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_ss" - + "ds\030\002 \001(\005B\003\340A\001\"s\n\030NodeInitializationActio" - + "n\022\034\n\017executable_file\030\001 \001(\tB\003\340A\002\0229\n\021execu" - + "tion_timeout\030\002 \001(\0132\031.google.protobuf.Dur" - + "ationB\003\340A\001\"\204\003\n\rClusterStatus\022A\n\005state\030\001 " - + "\001(\0162-.google.cloud.dataproc.v1.ClusterSt" - + "atus.StateB\003\340A\003\022\026\n\006detail\030\002 \001(\tB\006\340A\003\340A\001\022" - + "9\n\020state_start_time\030\003 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\022G\n\010substate\030\004 \001(\01620.g" - + "oogle.cloud.dataproc.v1.ClusterStatus.Su" - + "bstateB\003\340A\003\"V\n\005State\022\013\n\007UNKNOWN\020\000\022\014\n\010CRE" - + "ATING\020\001\022\013\n\007RUNNING\020\002\022\t\n\005ERROR\020\003\022\014\n\010DELET" - + "ING\020\004\022\014\n\010UPDATING\020\005\"<\n\010Substate\022\017\n\013UNSPE" - + "CIFIED\020\000\022\r\n\tUNHEALTHY\020\001\022\020\n\014STALE_STATUS\020" - + "\002\"S\n\016SecurityConfig\022A\n\017kerberos_config\030\001" - + " \001(\0132(.google.cloud.dataproc.v1.Kerberos" - + "Config\"\220\004\n\016KerberosConfig\022\034\n\017enable_kerb" - + "eros\030\001 \001(\010B\003\340A\001\022(\n\033root_principal_passwo" - + "rd_uri\030\002 \001(\tB\003\340A\002\022\030\n\013kms_key_uri\030\003 \001(\tB\003" - + "\340A\002\022\031\n\014keystore_uri\030\004 \001(\tB\003\340A\001\022\033\n\016trusts" - + "tore_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_uri\030\010 \001(\tB" - + "\003\340A\001\022$\n\027cross_realm_trust_realm\030\t \001(\tB\003\340" - + "A\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_uri\030\r \001(\tB" - + "\003\340A\001\022\037\n\022tgt_lifetime_hours\030\016 \001(\005B\003\340A\001\022\022\n" - + "\005realm\030\017 \001(\tB\003\340A\001\"\371\001\n\016SoftwareConfig\022\032\n\r" - + "image_version\030\001 \001(\tB\003\340A\001\022Q\n\nproperties\030\002" - + " \003(\01328.google.cloud.dataproc.v1.Software" - + "Config.PropertiesEntryB\003\340A\001\022E\n\023optional_" - + "components\030\003 \003(\0162#.google.cloud.dataproc" - + ".v1.ComponentB\003\340A\001\0321\n\017PropertiesEntry\022\013\n" - + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\203\002\n\017Lifecy" - + "cleConfig\0227\n\017idle_delete_ttl\030\001 \001(\0132\031.goo" - + "gle.protobuf.DurationB\003\340A\001\022;\n\020auto_delet" - + "e_time\030\002 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\001H\000\0229\n\017auto_delete_ttl\030\003 \001(\0132\031.googl" - + "e.protobuf.DurationB\003\340A\001H\000\0228\n\017idle_start" - + "_time\030\004 \001(\0132\032.google.protobuf.TimestampB" - + "\003\340A\003B\005\n\003ttl\"\232\002\n\016ClusterMetrics\022O\n\014hdfs_m" - + "etrics\030\001 \003(\01329.google.cloud.dataproc.v1." - + "ClusterMetrics.HdfsMetricsEntry\022O\n\014yarn_" - + "metrics\030\002 \003(\01329.google.cloud.dataproc.v1" - + ".ClusterMetrics.YarnMetricsEntry\0322\n\020Hdfs" - + "MetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003" - + ":\0028\001\0322\n\020YarnMetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\003:\0028\001\"\226\001\n\024CreateClusterReques" - + "t\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001" - + "(\tB\003\340A\002\0227\n\007cluster\030\002 \001(\0132!.google.cloud." - + "dataproc.v1.ClusterB\003\340A\002\022\027\n\nrequest_id\030\004" - + " \001(\tB\003\340A\001\"\256\002\n\024UpdateClusterRequest\022\027\n\npr" - + "oject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\005 \001(\tB\003\340A\002" - + "\022\031\n\014cluster_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\013u" - + "pdate_mask\030\004 \001(\0132\032.google.protobuf.Field" - + "MaskB\003\340A\002\022\027\n\nrequest_id\030\007 \001(\tB\003\340A\001\"\223\001\n\024D" - + "eleteClusterRequest\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_nam" - + "e\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\021GetClusterRe" - + "quest\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\nproject_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\npag" - + "e_token\030\003 \001(\tB\003\340A\001\"n\n\024ListClustersRespon" - + "se\0228\n\010clusters\030\001 \003(\0132!.google.cloud.data" - + "proc.v1.ClusterB\003\340A\003\022\034\n\017next_page_token\030" - + "\002 \001(\tB\003\340A\003\"a\n\026DiagnoseClusterRequest\022\027\n\n" - + "project_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340" - + "A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\"1\n\026Diagnos" - + "eClusterResults\022\027\n\noutput_uri\030\001 \001(\tB\003\340A\003" - + "\"\370\001\n\023ReservationAffinity\022Y\n\030consume_rese" - + "rvation_type\030\001 \001(\01622.google.cloud.datapr" - + "oc.v1.ReservationAffinity.TypeB\003\340A\001\022\020\n\003k" - + "ey\030\002 \001(\tB\003\340A\001\022\023\n\006values\030\003 \003(\tB\003\340A\001\"_\n\004Ty" - + "pe\022\024\n\020TYPE_UNSPECIFIED\020\000\022\022\n\016NO_RESERVATI" - + "ON\020\001\022\023\n\017ANY_RESERVATION\020\002\022\030\n\024SPECIFIC_RE" - + "SERVATION\020\0032\377\014\n\021ClusterController\022\200\002\n\rCr" - + "eateCluster\022..google.cloud.dataproc.v1.C" - + "reateClusterRequest\032\035.google.longrunning" - + ".Operation\"\237\001\202\323\344\223\002>\"3/v1/projects/{proje" - + "ct_id}/regions/{region}/clusters:\007cluste" - + "r\332A\031project_id,region,cluster\312A<\n\007Cluste" - + "r\0221google.cloud.dataproc.v1.ClusterOpera" - + "tionMetadata\022\250\002\n\rUpdateCluster\022..google." - + "cloud.dataproc.v1.UpdateClusterRequest\032\035" - + ".google.longrunning.Operation\"\307\001\202\323\344\223\002M2B" - + "/v1/projects/{project_id}/regions/{regio" - + "n}/clusters/{cluster_name}:\007cluster\332A2pr" - + "oject_id,region,cluster_name,cluster,upd" - + "ate_mask\312A<\n\007Cluster\0221google.cloud.datap" - + "roc.v1.ClusterOperationMetadata\022\231\002\n\rDele" - + "teCluster\022..google.cloud.dataproc.v1.Del" - + "eteClusterRequest\032\035.google.longrunning.O" - + "peration\"\270\001\202\323\344\223\002D*B/v1/projects/{project" - + "_id}/regions/{region}/clusters/{cluster_" - + "name}\332A\036project_id,region,cluster_name\312A" - + "J\n\025google.protobuf.Empty\0221google.cloud.d" - + "ataproc.v1.ClusterOperationMetadata\022\311\001\n\n" - + "GetCluster\022+.google.cloud.dataproc.v1.Ge" - + "tClusterRequest\032!.google.cloud.dataproc." - + "v1.Cluster\"k\202\323\344\223\002D\022B/v1/projects/{projec" - + "t_id}/regions/{region}/clusters/{cluster" - + "_name}\332A\036project_id,region,cluster_name\022" - + "\331\001\n\014ListClusters\022-.google.cloud.dataproc" - + ".v1.ListClustersRequest\032..google.cloud.d" - + "ataproc.v1.ListClustersResponse\"j\202\323\344\223\0025\022" - + "3/v1/projects/{project_id}/regions/{regi" - + "on}/clusters\332A\021project_id,region\332A\030proje" - + "ct_id,region,filter\022\252\002\n\017DiagnoseCluster\022" - + "0.google.cloud.dataproc.v1.DiagnoseClust" - + "erRequest\032\035.google.longrunning.Operation" - + "\"\305\001\202\323\344\223\002P\"K/v1/projects/{project_id}/reg" - + "ions/{region}/clusters/{cluster_name}:di" - + "agnose:\001*\332A\036project_id,region,cluster_na" - + "me\312AK\n\026DiagnoseClusterResults\0221google.cl" - + "oud.dataproc.v1.ClusterOperationMetadata" - + "\032K\312A\027dataproc.googleapis.com\322A.https://w" - + "ww.googleapis.com/auth/cloud-platformBq\n" - + "\034com.google.cloud.dataproc.v1B\rClustersP" - + "rotoP\001Z@google.golang.org/genproto/googl" - + "eapis/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.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", - "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", - }); - internal_static_google_cloud_dataproc_v1_EndpointConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - 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(3); - 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(4); - 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(5); - 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", - "ServiceAccount", - "ServiceAccountScopes", - "Tags", - "Metadata", - "ReservationAffinity", - }); - 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_InstanceGroupConfig_descriptor = - getDescriptor().getMessageTypes().get(6); - 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(7); - 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(8); - 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(9); - 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", - }); - internal_static_google_cloud_dataproc_v1_NodeInitializationAction_descriptor = - getDescriptor().getMessageTypes().get(10); - 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(11); - 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(12); - 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", - }); - internal_static_google_cloud_dataproc_v1_KerberosConfig_descriptor = - getDescriptor().getMessageTypes().get(13); - 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_SoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(14); - 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(15); - 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_ClusterMetrics_descriptor = - getDescriptor().getMessageTypes().get(16); - 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(17); - 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", - }); - internal_static_google_cloud_dataproc_v1_UpdateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - 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_DeleteClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - 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(20); - 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(21); - 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(22); - 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(23); - 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(24); - 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(25); - 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.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.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 8a8254b3..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/Component.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/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.
-   * 
- * - * ANACONDA = 5; - */ - ANACONDA(5), - /** - * - * - *
-   * 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 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.
-   * 
- * - * ANACONDA = 5; - */ - public static final int ANACONDA_VALUE = 5; - /** - * - * - *
-   * 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 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 3: - return HIVE_WEBHCAT; - case 1: - return JUPYTER; - case 6: - return PRESTO; - 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/CreateAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateAutoscalingPolicyRequest.java deleted file mode 100644 index c42617af..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 (!getParentBytes().isEmpty()) { - 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 (!getParentBytes().isEmpty()) { - 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/CreateClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.java deleted file mode 100644 index 96d8fb87..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequest.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/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_ = ""; - } - - @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; - } - 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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (cluster_ != null) { - output.writeMessage(2, getCluster()); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (cluster_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCluster()); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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.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 (!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 = (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_ = ""; - - 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_; - 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(); - } - 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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 699e931a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/CreateClusterRequestOrBuilder.java +++ /dev/null @@ -1,156 +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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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][google.cloud.dataproc.v1.CreateClusterRequest] requests  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(); -} 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 4a20dcde..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 (!getParentBytes().isEmpty()) { - 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 (!getParentBytes().isEmpty()) { - 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 e78442be..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 e361a7b8..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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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/DeleteClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java deleted file mode 100644 index cb49ccee..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequest.java +++ /dev/null @@ -1,1422 +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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!getClusterUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterUuid_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!getClusterUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterUuid_); - } - if (!getRequestIdBytes().isEmpty()) { - 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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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 532cf74d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DeleteClusterRequestOrBuilder.java +++ /dev/null @@ -1,170 +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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1.DeleteClusterRequest] requests  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 c8be7961..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 b5af6240..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 (!getNameBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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 e9913d29..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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 d8a82026..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 (!getOutputUriBytes().isEmpty()) { - 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 (!getOutputUriBytes().isEmpty()) { - 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 60cd4baf..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfig.java +++ /dev/null @@ -1,847 +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_ = ""; - } - - @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; - } - 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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (!getBootDiskTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, bootDiskType_); - } - 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 (!getBootDiskTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, bootDiskType_); - } - 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 (!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 = (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; - - 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_; - 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()); - } - 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 df7d411f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/DiskConfigOrBuilder.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/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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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(); -} 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 44e5b426..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 (!getGcePdKmsKeyNameBytes().isEmpty()) { - 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 (!getGcePdKmsKeyNameBytes().isEmpty()) { - 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/GceClusterConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java deleted file mode 100644 index 9ec84a3d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfig.java +++ /dev/null @@ -1,2866 +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_ = ""; - 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; - } - 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); - } - - 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 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(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getZoneUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zoneUri_); - } - if (!getNetworkUriBytes().isEmpty()) { - 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 (!getSubnetworkUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, subnetworkUri_); - } - if (internalIpOnly_ != false) { - output.writeBool(7, internalIpOnly_); - } - if (!getServiceAccountBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_); - } - if (reservationAffinity_ != null) { - output.writeMessage(11, getReservationAffinity()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getZoneUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zoneUri_); - } - if (!getNetworkUriBytes().isEmpty()) { - 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 (!getSubnetworkUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, subnetworkUri_); - } - if (internalIpOnly_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, internalIpOnly_); - } - if (!getServiceAccountBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_); - } - if (reservationAffinity_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(11, getReservationAffinity()); - } - 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 (!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 (!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) + 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(); - } - 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; - - 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; - } - 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.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(); - } - 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.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()); - } - 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 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_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 047c0eab..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GceClusterConfigOrBuilder.java +++ /dev/null @@ -1,460 +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 [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(); -} 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 35a0cb55..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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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/GetClusterRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/GetClusterRequest.java deleted file mode 100644 index b3625209..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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 8efd785b..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 0286535b..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 (!getNameBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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/HadoopJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJob.java deleted file mode 100644 index 50beb76f..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJob.java +++ /dev/null @@ -1,2870 +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 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 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 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 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 c46c2deb..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HadoopJobOrBuilder.java +++ /dev/null @@ -1,438 +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 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 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 19080e17..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJob.java +++ /dev/null @@ -1,2149 +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 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 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 1132b56e..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/HiveJobOrBuilder.java +++ /dev/null @@ -1,299 +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 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/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 9293c072..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfig.java +++ /dev/null @@ -1,3195 +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 master instance 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 (!getImageUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_); - } - if (!getMachineTypeUriBytes().isEmpty()) { - 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 (!getMinCpuPlatformBytes().isEmpty()) { - 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 (!getImageUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_); - } - if (!getMachineTypeUriBytes().isEmpty()) { - 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 (!getMinCpuPlatformBytes().isEmpty()) { - 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 master instance 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 master instance 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 master instance 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 9709605d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/InstanceGroupConfigOrBuilder.java +++ /dev/null @@ -1,419 +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 master instance 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 365620eb..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 (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (template_ != null) { - output.writeMessage(2, getTemplate()); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (template_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTemplate()); - } - if (!getRequestIdBytes().isEmpty()) { - 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 29844db6..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 100 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 100 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 100 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 100 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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (version_ != 0) { - output.writeInt32(2, version_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 100 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 100 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 100 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 100 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 100 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 100 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 100 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 b7c701af..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 100 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 100 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 100 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 100 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 100 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 191e0e09..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 (!getDriverControlFilesUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, driverControlFilesUri_); - } - if (!getDriverOutputResourceUriBytes().isEmpty()) { - 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 (!getJobUuidBytes().isEmpty()) { - 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 (!getDriverControlFilesUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, driverControlFilesUri_); - } - if (!getDriverOutputResourceUriBytes().isEmpty()) { - 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 (!getJobUuidBytes().isEmpty()) { - 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 6f10123a..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 (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobId_); - } - if (status_ != null) { - output.writeMessage(2, getStatus()); - } - if (!getOperationTypeBytes().isEmpty()) { - 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 (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobId_); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); - } - if (!getOperationTypeBytes().isEmpty()) { - 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 27b3ec8b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacement.java +++ /dev/null @@ -1,820 +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(); - } - 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; - } - 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; - } - - @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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUuid_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUuid_); - } - 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 (!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(); - 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; - } - - @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_ = ""; - - 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); - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - 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(); - } - 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 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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 d6fefeb0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobPlacementOrBuilder.java +++ /dev/null @@ -1,77 +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(); -} 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 3aa591a6..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - 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 74d7e7b8..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobScheduling.java +++ /dev/null @@ -1,564 +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; - } - 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 terminating 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.
-   * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - @java.lang.Override - public int getMaxFailuresPerHour() { - return maxFailuresPerHour_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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_); - } - 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_); - } - 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 (!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 = (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; - - 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_; - 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()); - } - 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 terminating 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.
-     * 
- * - * 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 terminating 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.
-     * 
- * - * 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 terminating 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.
-     * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxFailuresPerHour() { - - maxFailuresPerHour_ = 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 15665dc4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobSchedulingOrBuilder.java +++ /dev/null @@ -1,43 +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 terminating 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.
-   * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - int getMaxFailuresPerHour(); -} 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 b88f595a..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 (!getDetailsBytes().isEmpty()) { - 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 (!getDetailsBytes().isEmpty()) { - 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 982ab839..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/JobsProto.java +++ /dev/null @@ -1,809 +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_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\"D\n\014JobPlac" - + "ement\022\031\n\014cluster_name\030\001 \001(\tB\003\340A\002\022\031\n\014clus" - + "ter_uuid\030\002 \001(\tB\003\340A\003\"\331\003\n\tJobStatus\022=\n\005sta" - + "te\030\001 \001(\0162).google.cloud.dataproc.v1.JobS" - + "tatus.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.pro" - + "tobuf.TimestampB\003\340A\003\022C\n\010substate\030\007 \001(\0162," - + ".google.cloud.dataproc.v1.JobStatus.Subs" - + "tateB\003\340A\003\"\251\001\n\005State\022\025\n\021STATE_UNSPECIFIED" - + "\020\000\022\013\n\007PENDING\020\001\022\016\n\nSETUP_DONE\020\010\022\013\n\007RUNNI" - + "NG\020\002\022\022\n\016CANCEL_PENDING\020\003\022\022\n\016CANCEL_START" - + "ED\020\007\022\r\n\tCANCELLED\020\004\022\010\n\004DONE\020\005\022\t\n\005ERROR\020\006" - + "\022\023\n\017ATTEMPT_FAILURE\020\t\"H\n\010Substate\022\017\n\013UNS" - + "PECIFIED\020\000\022\r\n\tSUBMITTED\020\001\022\n\n\006QUEUED\020\002\022\020\n" - + "\014STALE_STATUS\020\003\"<\n\014JobReference\022\027\n\nproje" - + "ct_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\005" - + "state\030\002 \001(\0162/.google.cloud.dataproc.v1.Y" - + "arnApplication.StateB\003\340A\002\022\025\n\010progress\030\003 " - + "\001(\002B\003\340A\002\022\031\n\014tracking_url\030\004 \001(\tB\003\340A\001\"\207\001\n\005" - + "State\022\025\n\021STATE_UNSPECIFIED\020\000\022\007\n\003NEW\020\001\022\016\n" - + "\nNEW_SAVING\020\002\022\r\n\tSUBMITTED\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(\013" - + "2&.google.cloud.dataproc.v1.JobReference" - + "B\003\340A\001\022>\n\tplacement\030\002 \001(\0132&.google.cloud." - + "dataproc.v1.JobPlacementB\003\340A\002\022>\n\nhadoop_" - + "job\030\003 \001(\0132#.google.cloud.dataproc.v1.Had" - + "oopJobB\003\340A\001H\000\022<\n\tspark_job\030\004 \001(\0132\".googl" - + "e.cloud.dataproc.v1.SparkJobB\003\340A\001H\000\022@\n\013p" - + "yspark_job\030\005 \001(\0132$.google.cloud.dataproc" - + ".v1.PySparkJobB\003\340A\001H\000\022:\n\010hive_job\030\006 \001(\0132" - + "!.google.cloud.dataproc.v1.HiveJobB\003\340A\001H" - + "\000\0228\n\007pig_job\030\007 \001(\0132 .google.cloud.datapr" - + "oc.v1.PigJobB\003\340A\001H\000\022?\n\013spark_r_job\030\025 \001(\013" - + "2#.google.cloud.dataproc.v1.SparkRJobB\003\340" - + "A\001H\000\022C\n\rspark_sql_job\030\014 \001(\0132%.google.clo" - + "ud.dataproc.v1.SparkSqlJobB\003\340A\001H\000\022>\n\npre" - + "sto_job\030\027 \001(\0132#.google.cloud.dataproc.v1" - + ".PrestoJobB\003\340A\001H\000\0228\n\006status\030\010 \001(\0132#.goog" - + "le.cloud.dataproc.v1.JobStatusB\003\340A\003\022@\n\016s" - + "tatus_history\030\r \003(\0132#.google.cloud.datap" - + "roc.v1.JobStatusB\003\340A\003\022I\n\021yarn_applicatio" - + "ns\030\t \003(\0132).google.cloud.dataproc.v1.Yarn" - + "ApplicationB\003\340A\003\022\'\n\032driver_output_resour" - + "ce_uri\030\021 \001(\tB\003\340A\003\022%\n\030driver_control_file" - + "s_uri\030\017 \001(\tB\003\340A\003\022>\n\006labels\030\022 \003(\0132).googl" - + "e.cloud.dataproc.v1.Job.LabelsEntryB\003\340A\001" - + "\022@\n\nscheduling\030\024 \001(\0132\'.google.cloud.data" - + "proc.v1.JobSchedulingB\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\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\n\n\010t" - + "ype_job\"3\n\rJobScheduling\022\"\n\025max_failures" - + "_per_hour\030\001 \001(\005B\003\340A\001\"\212\001\n\020SubmitJobReques" - + "t\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001" - + "(\tB\003\340A\002\022/\n\003job\030\002 \001(\0132\035.google.cloud.data" - + "proc.v1.JobB\003\340A\002\022\027\n\nrequest_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.v" - + "1.JobStatusB\003\340A\003\022\033\n\016operation_type\030\003 \001(\t" - + "B\003\340A\003\0223\n\nstart_time\030\004 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003\"R\n\rGetJobRequest\022\027\n\np" - + "roject_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\"\263\002\n\017ListJobsReque" - + "st\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\014cluster_name\030\004 \001(\tB" - + "\003\340A\001\022Y\n\021job_state_matcher\030\005 \001(\01629.google" - + ".cloud.dataproc.v1.ListJobsRequest.JobSt" - + "ateMatcherB\003\340A\001\022\023\n\006filter\030\007 \001(\tB\003\340A\001\"6\n\017" - + "JobStateMatcher\022\007\n\003ALL\020\000\022\n\n\006ACTIVE\020\001\022\016\n\n" - + "NON_ACTIVE\020\002\"\274\001\n\020UpdateJobRequest\022\027\n\npro" - + "ject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\002 \001(\tB\003\340A\002\022" - + "\023\n\006job_id\030\003 \001(\tB\003\340A\002\022/\n\003job\030\004 \001(\0132\035.goog" - + "le.cloud.dataproc.v1.JobB\003\340A\002\0224\n\013update_" - + "mask\030\005 \001(\0132\032.google.protobuf.FieldMaskB\003" - + "\340A\002\"b\n\020ListJobsResponse\0220\n\004jobs\030\001 \003(\0132\035." - + "google.cloud.dataproc.v1.JobB\003\340A\003\022\034\n\017nex" - + "t_page_token\030\002 \001(\tB\003\340A\001\"U\n\020CancelJobRequ" - + "est\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\020Delete" - + "JobRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006r" - + "egion\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\tSubmitJob\022*.google.c" - + "loud.dataproc.v1.SubmitJobRequest\032\035.goog" - + "le.cloud.dataproc.v1.Job\"Y\202\323\344\223\002;\"6/v1/pr" - + "ojects/{project_id}/regions/{region}/job" - + "s:submit:\001*\332A\025project_id,region,job\022\336\001\n\024" - + "SubmitJobAsOperation\022*.google.cloud.data" - + "proc.v1.SubmitJobRequest\032\035.google.longru" - + "nning.Operation\"{\202\323\344\223\002F\"A/v1/projects/{p" - + "roject_id}/regions/{region}/jobs:submitA" - + "sOperation:\001*\332A\027project_id, region, job\312" - + "A\022\n\003Job\022\013JobMetadata\022\255\001\n\006GetJob\022\'.google" - + ".cloud.dataproc.v1.GetJobRequest\032\035.googl" - + "e.cloud.dataproc.v1.Job\"[\202\323\344\223\002:\0228/v1/pro" - + "jects/{project_id}/regions/{region}/jobs" - + "/{job_id}\332A\030project_id,region,job_id\022\311\001\n" - + "\010ListJobs\022).google.cloud.dataproc.v1.Lis" - + "tJobsRequest\032*.google.cloud.dataproc.v1." - + "ListJobsResponse\"f\202\323\344\223\0021\022//v1/projects/{" - + "project_id}/regions/{region}/jobs\332A\021proj" - + "ect_id,region\332A\030project_id,region,filter" - + "\022\235\001\n\tUpdateJob\022*.google.cloud.dataproc.v" - + "1.UpdateJobRequest\032\035.google.cloud.datapr" - + "oc.v1.Job\"E\202\323\344\223\002?28/v1/projects/{project" - + "_id}/regions/{region}/jobs/{job_id}:\003job" - + "\022\275\001\n\tCancelJob\022*.google.cloud.dataproc.v" - + "1.CancelJobRequest\032\035.google.cloud.datapr" - + "oc.v1.Job\"e\202\323\344\223\002D\"?/v1/projects/{project" - + "_id}/regions/{region}/jobs/{job_id}:canc" - + "el:\001*\332A\030project_id,region,job_id\022\254\001\n\tDel" - + "eteJob\022*.google.cloud.dataproc.v1.Delete" - + "JobRequest\032\026.google.protobuf.Empty\"[\202\323\344\223" - + "\002:*8/v1/projects/{project_id}/regions/{r" - + "egion}/jobs/{job_id}\332A\030project_id,region" - + ",job_id\032K\312A\027dataproc.googleapis.com\322A.ht" - + "tps://www.googleapis.com/auth/cloud-plat" - + "formBm\n\034com.google.cloud.dataproc.v1B\tJo" - + "bsProtoP\001Z@google.golang.org/genproto/go" - + "ogleapis/cloud/dataproc/v1;dataprocb\006pro" - + "to3" - }; - 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", - }); - 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", - }); - 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 fb3d78bd..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_; - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_; - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 (!getRootPrincipalPasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rootPrincipalPasswordUri_); - } - if (!getKmsKeyUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyUri_); - } - if (!getKeystoreUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, keystoreUri_); - } - if (!getTruststoreUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, truststoreUri_); - } - if (!getKeystorePasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, keystorePasswordUri_); - } - if (!getKeyPasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, keyPasswordUri_); - } - if (!getTruststorePasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, truststorePasswordUri_); - } - if (!getCrossRealmTrustRealmBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, crossRealmTrustRealm_); - } - if (!getCrossRealmTrustKdcBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, crossRealmTrustKdc_); - } - if (!getCrossRealmTrustAdminServerBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, crossRealmTrustAdminServer_); - } - if (!getCrossRealmTrustSharedPasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 12, crossRealmTrustSharedPasswordUri_); - } - if (!getKdcDbKeyUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, kdcDbKeyUri_); - } - if (tgtLifetimeHours_ != 0) { - output.writeInt32(14, tgtLifetimeHours_); - } - if (!getRealmBytes().isEmpty()) { - 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 (!getRootPrincipalPasswordUriBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rootPrincipalPasswordUri_); - } - if (!getKmsKeyUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kmsKeyUri_); - } - if (!getKeystoreUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, keystoreUri_); - } - if (!getTruststoreUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, truststoreUri_); - } - if (!getKeystorePasswordUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, keystorePasswordUri_); - } - if (!getKeyPasswordUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, keyPasswordUri_); - } - if (!getTruststorePasswordUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, truststorePasswordUri_); - } - if (!getCrossRealmTrustRealmBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, crossRealmTrustRealm_); - } - if (!getCrossRealmTrustKdcBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, crossRealmTrustKdc_); - } - if (!getCrossRealmTrustAdminServerBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(11, crossRealmTrustAdminServer_); - } - if (!getCrossRealmTrustSharedPasswordUriBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 12, crossRealmTrustSharedPasswordUri_); - } - if (!getKdcDbKeyUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, kdcDbKeyUri_); - } - if (tgtLifetimeHours_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, tgtLifetimeHours_); - } - if (!getRealmBytes().isEmpty()) { - 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_ = ""; - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearRootPrincipalPasswordUri() { - - rootPrincipalPasswordUri_ = getDefaultInstance().getRootPrincipalPasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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_ = ""; - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearKmsKeyUri() { - - kmsKeyUri_ = getDefaultInstance().getKmsKeyUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 426c5c3a..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(); - - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The rootPrincipalPasswordUri. - */ - java.lang.String getRootPrincipalPasswordUri(); - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for rootPrincipalPasswordUri. - */ - com.google.protobuf.ByteString getRootPrincipalPasswordUriBytes(); - - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The kmsKeyUri. - */ - java.lang.String getKmsKeyUri(); - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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/LifecycleConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LifecycleConfig.java deleted file mode 100644 index 09df34bf..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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 624e8e12..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 10 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 10 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 10 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 ca1058fa..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 (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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 95427906..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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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/ListClustersRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/ListClustersRequest.java deleted file mode 100644 index 2771c99f..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, region_); - } - if (!getFilterBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, region_); - } - if (!getFilterBytes().isEmpty()) { - 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 47e0b868..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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < clusters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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 96983542..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterName_); - } - if (jobStateMatcher_ - != com.google.cloud.dataproc.v1.ListJobsRequest.JobStateMatcher.ALL.getNumber()) { - output.writeEnum(5, jobStateMatcher_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); - } - if (!getFilterBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); - } - if (!getFilterBytes().isEmpty()) { - 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 3505bc6e..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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < jobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobs_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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 74755ea0..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 (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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 fd640e15..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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < templates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, templates_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.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 ac38238d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/LocationName.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. - */ - -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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class LocationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - 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 = - PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location); - } - - /** Builder for LocationName. */ - public static class Builder { - - private String project; - private String location; - - 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() {} - - private Builder(LocationName locationName) { - project = locationName.project; - location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof LocationName) { - LocationName that = (LocationName) o; - return (this.project.equals(that.project)) && (this.location.equals(that.location)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - return h; - } -} 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 fa0a8d90..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](http://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 76174f48..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 (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterNameBytes().isEmpty()) { - 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 8203478d..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 (!getInstanceTemplateNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceTemplateName_); - } - if (!getInstanceGroupManagerNameBytes().isEmpty()) { - 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 (!getInstanceTemplateNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceTemplateName_); - } - if (!getInstanceGroupManagerNameBytes().isEmpty()) { - 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/NodeInitializationAction.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/NodeInitializationAction.java deleted file mode 100644 index 93de6a62..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 (!getExecutableFileBytes().isEmpty()) { - 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 (!getExecutableFileBytes().isEmpty()) { - 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 7b3bfca6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/OperationsProto.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/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_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\032\034google/api/annotations." - + "proto\"\211\002\n\026ClusterOperationStatus\022J\n\005stat" - + "e\030\001 \001(\01626.google.cloud.dataproc.v1.Clust" - + "erOperationStatus.StateB\003\340A\003\022\030\n\013inner_st" - + "ate\030\002 \001(\tB\003\340A\003\022\024\n\007details\030\003 \001(\tB\003\340A\003\0229\n\020" - + "state_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\030Cl" - + "usterOperationMetadata\022\031\n\014cluster_name\030\007" - + " \001(\tB\003\340A\003\022\031\n\014cluster_uuid\030\010 \001(\tB\003\340A\003\022E\n\006" - + "status\030\t \001(\01320.google.cloud.dataproc.v1." - + "ClusterOperationStatusB\003\340A\003\022M\n\016status_hi" - + "story\030\n \003(\01320.google.cloud.dataproc.v1.C" - + "lusterOperationStatusB\003\340A\003\022\033\n\016operation_" - + "type\030\013 \001(\tB\003\340A\003\022\030\n\013description\030\014 \001(\tB\003\340A" - + "\003\022S\n\006labels\030\r \003(\0132>.google.cloud.datapro" - + "c.v1.ClusterOperationMetadata.LabelsEntr" - + "yB\003\340A\003\022\025\n\010warnings\030\016 \003(\tB\003\340A\003\032-\n\013LabelsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001Bs\n\034" - + "com.google.cloud.dataproc.v1B\017Operations" - + "ProtoP\001Z@google.golang.org/genproto/goog" - + "leapis/cloud/dataproc/v1;dataprocb\006proto" - + "3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_ClusterOperationStatus_descriptor = - getDescriptor().getMessageTypes().get(0); - 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(1); - 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(); - com.google.api.AnnotationsProto.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 959abd9f..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 (!getStepIdBytes().isEmpty()) { - 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 (!getStepIdBytes().isEmpty()) { - 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/PigJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJob.java deleted file mode 100644 index 0f835a9a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJob.java +++ /dev/null @@ -1,2438 +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 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 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 0a51b64c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PigJobOrBuilder.java +++ /dev/null @@ -1,336 +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 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 3fb20f5d..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJob.java +++ /dev/null @@ -1,2273 +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 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 (!getOutputFormatBytes().isEmpty()) { - 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 (!getOutputFormatBytes().isEmpty()) { - 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 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 c5c3173a..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PrestoJobOrBuilder.java +++ /dev/null @@ -1,290 +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 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/PySparkJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/PySparkJob.java deleted file mode 100644 index 4fd5c99e..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 (!getMainPythonFileUriBytes().isEmpty()) { - 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 (!getMainPythonFileUriBytes().isEmpty()) { - 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 de0b236c..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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 568b46aa..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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 afb2e095..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/RegionName.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. - */ - -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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class RegionName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/regions/{region}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String region; - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private RegionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - } - - 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 = - PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("region", region); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "region", region); - } - - /** Builder for RegionName. */ - public static class Builder { - - private String project; - private String region; - - 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() {} - - private Builder(RegionName regionName) { - project = regionName.project; - region = regionName.region; - } - - public RegionName build() { - return new RegionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof RegionName) { - RegionName that = (RegionName) o; - return (this.project.equals(that.project)) && (this.region.equals(that.region)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= region.hashCode(); - return h; - } -} 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 4edad5fb..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 (!getKeyBytes().isEmpty()) { - 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 (!getKeyBytes().isEmpty()) { - 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/SecurityConfig.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfig.java deleted file mode 100644 index dade0e6c..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfig.java +++ /dev/null @@ -1,732 +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 Kerberos.
- * 
- * - * 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; - } - 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_; - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - * - * @return Whether the kerberosConfig field is set. - */ - @java.lang.Override - public boolean hasKerberosConfig() { - return kerberosConfig_ != null; - } - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - * - * @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_; - } - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - return getKerberosConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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()); - } - 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()); - } - 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 (!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(); - } - 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 Kerberos.
-   * 
- * - * 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; - } - 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(); - } - 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()); - } - 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_; - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - * - * @return Whether the kerberosConfig field is set. - */ - public boolean hasKerberosConfig() { - return kerberosConfigBuilder_ != null || kerberosConfig_ != null; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - * - * @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(); - } - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - 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; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - 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; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - 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; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - public Builder clearKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = null; - onChanged(); - } else { - kerberosConfig_ = null; - kerberosConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - public com.google.cloud.dataproc.v1.KerberosConfig.Builder getKerberosConfigBuilder() { - - onChanged(); - return getKerberosConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - 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_; - } - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - 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_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 c0b788a2..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SecurityConfigOrBuilder.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 SecurityConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1.SecurityConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - * - * @return Whether the kerberosConfig field is set. - */ - boolean hasKerberosConfig(); - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - * - * @return The kerberosConfig. - */ - com.google.cloud.dataproc.v1.KerberosConfig getKerberosConfig(); - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1.KerberosConfig kerberos_config = 1; - */ - com.google.cloud.dataproc.v1.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); -} 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 923a4367..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SharedProto.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/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); - } - - 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\034google/api/an" - + "notations.proto*|\n\tComponent\022\031\n\025COMPONEN" - + "T_UNSPECIFIED\020\000\022\014\n\010ANACONDA\020\005\022\020\n\014HIVE_WE" - + "BHCAT\020\003\022\013\n\007JUPYTER\020\001\022\n\n\006PRESTO\020\006\022\014\n\010ZEPP" - + "ELIN\020\004\022\r\n\tZOOKEEPER\020\010Bo\n\034com.google.clou" - + "d.dataproc.v1B\013SharedProtoP\001Z@google.gol" - + "ang.org/genproto/googleapis/cloud/datapr" - + "oc/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.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} 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 df14bda8..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 (!getImageVersionBytes().isEmpty()) { - 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 (!getImageVersionBytes().isEmpty()) { - 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/SparkJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java deleted file mode 100644 index 27fad2e2..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJob.java +++ /dev/null @@ -1,2809 +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 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 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 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 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 d7bee0cc..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkJobOrBuilder.java +++ /dev/null @@ -1,422 +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 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 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/SparkRJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkRJob.java deleted file mode 100644 index b4ed383c..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 (!getMainRFileUriBytes().isEmpty()) { - 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 (!getMainRFileUriBytes().isEmpty()) { - 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/SparkSqlJob.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java deleted file mode 100644 index 4fe814cf..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJob.java +++ /dev/null @@ -1,2318 +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 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 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 feebc697..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SparkSqlJobOrBuilder.java +++ /dev/null @@ -1,312 +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 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/SubmitJobRequest.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequest.java deleted file mode 100644 index f09f3fd4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequest.java +++ /dev/null @@ -1,1322 +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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (job_ != null) { - output.writeMessage(2, getJob()); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (job_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getJob()); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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 89394a14..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/SubmitJobRequestOrBuilder.java +++ /dev/null @@ -1,153 +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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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][google.cloud.dataproc.v1.SubmitJobRequest] requests  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 31d64261..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 (!getNameBytes().isEmpty()) { - 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 (!getDescriptionBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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 (!getDescriptionBytes().isEmpty()) { - 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 20788914..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequest.java +++ /dev/null @@ -1,2768 +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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (cluster_ != null) { - output.writeMessage(3, getCluster()); - } - if (updateMask_ != null) { - output.writeMessage(4, getUpdateMask()); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, region_); - } - if (gracefulDecommissionTimeout_ != null) { - output.writeMessage(6, getGracefulDecommissionTimeout()); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, region_); - } - if (gracefulDecommissionTimeout_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, getGracefulDecommissionTimeout()); - } - if (!getRequestIdBytes().isEmpty()) { - 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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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 cf39dac2..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/UpdateClusterRequestOrBuilder.java +++ /dev/null @@ -1,422 +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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1.UpdateClusterRequest] requests  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 0105dec5..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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_); - } - if (!getJobIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_); - } - if (!getJobIdBytes().isEmpty()) { - 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/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 4d8f25d6..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadata.java +++ /dev/null @@ -1,3277 +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; - } - 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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTemplateBytes().isEmpty()) { - 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 (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, clusterUuid_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTemplateBytes().isEmpty()) { - 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 (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, clusterUuid_); - } - 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 (!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(); - 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_ = ""; - - 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_; - 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(); - } - 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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 61c07982..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowMetadataOrBuilder.java +++ /dev/null @@ -1,410 +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(); -} 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 34c5288a..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 (!getStepIdBytes().isEmpty()) { - 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 (!getJobIdBytes().isEmpty()) { - 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 (!getErrorBytes().isEmpty()) { - 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 (!getStepIdBytes().isEmpty()) { - 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 (!getJobIdBytes().isEmpty()) { - 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 (!getErrorBytes().isEmpty()) { - 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 f6fa56c0..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplate.java +++ /dev/null @@ -1,3355 +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; - } - 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); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getIdBytes().isEmpty()) { - 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)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getIdBytes().isEmpty()) { - 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)); - } - 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 (!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(); - } - 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(); - } - 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(); - } - 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_); - } - } - } - 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_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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 167a8a57..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateName.java +++ /dev/null @@ -1,360 +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 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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class WorkflowTemplateName implements ResourceName { - - @Deprecated - protected WorkflowTemplateName() {} - - private static final PathTemplate PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}"); - private static final PathTemplate PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}"); - - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - - private String project; - private String region; - private String workflowTemplate; - private String location; - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public String getWorkflowTemplate() { - return workflowTemplate; - } - - public String getLocation() { - return location; - } - - private WorkflowTemplateName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); - pathTemplate = PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE; - } - - private WorkflowTemplateName(ProjectLocationWorkflowTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); - pathTemplate = PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE; - } - - 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 newProjectRegionWorkflowTemplateBuilder() - .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 newProjectRegionWorkflowTemplateBuilder() - .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_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString); - return ofProjectRegionWorkflowTemplateName( - matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template")); - } else if (PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString); - return ofProjectLocationWorkflowTemplateName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow_template")); - } - throw new ValidationException("JobName.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_PATH_TEMPLATE.matches(formattedString) - || PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_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()); - } - - /** 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( - workflowTemplateName.pathTemplate == PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE, - "toBuilder is only supported when WorkflowTemplateName has the pattern of " - + "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}."); - project = workflowTemplateName.project; - region = workflowTemplateName.region; - 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; - - private 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); - } - } - - @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; - } -} 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 524587ca..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateOrBuilder.java +++ /dev/null @@ -1,441 +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); -} 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 c44ab556..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplatesProto.java +++ /dev/null @@ -1,628 +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\033google/prot" - + "obuf/empty.proto\032\037google/protobuf/timest" - + "amp.proto\"\315\005\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.p" - + "rotobuf.TimestampB\003\340A\003\0224\n\013update_time\030\005 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\022K\n\006" - + "labels\030\006 \003(\01326.google.cloud.dataproc.v1." - + "WorkflowTemplate.LabelsEntryB\003\340A\001\022K\n\tpla" - + "cement\030\007 \001(\01323.google.cloud.dataproc.v1." - + "WorkflowTemplatePlacementB\003\340A\002\0227\n\004jobs\030\010" - + " \003(\0132$.google.cloud.dataproc.v1.OrderedJ" - + "obB\003\340A\002\022D\n\nparameters\030\t \003(\0132+.google.clo" - + "ud.dataproc.v1.TemplateParameterB\003\340A\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.com/Wor" - + "kflowTemplate\022Iprojects/{project}/region" - + "s/{region}/workflowTemplates/{workflow_t" - + "emplate}\022Mprojects/{project}/locations/{" - + "location}/workflowTemplates/{workflow_te" - + "mplate} \001\"\264\001\n\031WorkflowTemplatePlacement\022" - + "C\n\017managed_cluster\030\001 \001(\0132(.google.cloud." - + "dataproc.v1.ManagedClusterH\000\022E\n\020cluster_" - + "selector\030\002 \001(\0132).google.cloud.dataproc.v" - + "1.ClusterSelectorH\000B\013\n\tplacement\"\343\001\n\016Man" - + "agedCluster\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\022<" - + "\n\006config\030\003 \001(\0132\'.google.cloud.dataproc.v" - + "1.ClusterConfigB\003\340A\002\022I\n\006labels\030\004 \003(\01324.g" - + "oogle.cloud.dataproc.v1.ManagedCluster.L" - + "abelsEntryB\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 " - + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\265\001\n\017ClusterSelect" - + "or\022\021\n\004zone\030\001 \001(\tB\003\340A\001\022Y\n\016cluster_labels\030" - + "\002 \003(\0132<.google.cloud.dataproc.v1.Cluster" - + "Selector.ClusterLabelsEntryB\003\340A\002\0324\n\022Clus" - + "terLabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\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.cloud.d" - + "ataproc.v1.HadoopJobB\003\340A\001H\000\022<\n\tspark_job" - + "\030\003 \001(\0132\".google.cloud.dataproc.v1.SparkJ" - + "obB\003\340A\001H\000\022@\n\013pyspark_job\030\004 \001(\0132$.google." - + "cloud.dataproc.v1.PySparkJobB\003\340A\001H\000\022:\n\010h" - + "ive_job\030\005 \001(\0132!.google.cloud.dataproc.v1" - + ".HiveJobB\003\340A\001H\000\0228\n\007pig_job\030\006 \001(\0132 .googl" - + "e.cloud.dataproc.v1.PigJobB\003\340A\001H\000\022?\n\013spa" - + "rk_r_job\030\013 \001(\0132#.google.cloud.dataproc.v" - + "1.SparkRJobB\003\340A\001H\000\022C\n\rspark_sql_job\030\007 \001(" - + "\0132%.google.cloud.dataproc.v1.SparkSqlJob" - + "B\003\340A\001H\000\022>\n\npresto_job\030\014 \001(\0132#.google.clo" - + "ud.dataproc.v1.PrestoJobB\003\340A\001H\000\022E\n\006label" - + "s\030\010 \003(\01320.google.cloud.dataproc.v1.Order" - + "edJob.LabelsEntryB\003\340A\001\022@\n\nscheduling\030\t \001" - + "(\0132\'.google.cloud.dataproc.v1.JobSchedul" - + "ingB\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\005valu" - + "e\030\002 \001(\t:\0028\001B\n\n\010job_type\"\235\001\n\021TemplatePara" - + "meter\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\006fields\030\002 \003(\t" - + "B\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\001\022F\n\nvalid" - + "ation\030\004 \001(\0132-.google.cloud.dataproc.v1.P" - + "arameterValidationB\003\340A\001\"\241\001\n\023ParameterVal" - + "idation\022:\n\005regex\030\001 \001(\0132).google.cloud.da" - + "taproc.v1.RegexValidationH\000\022;\n\006values\030\002 " - + "\001(\0132).google.cloud.dataproc.v1.ValueVali" - + "dationH\000B\021\n\017validation_type\"\'\n\017RegexVali" - + "dation\022\024\n\007regexes\030\001 \003(\tB\003\340A\002\"&\n\017ValueVal" - + "idation\022\023\n\006values\030\001 \003(\tB\003\340A\002\"\257\005\n\020Workflo" - + "wMetadata\022\025\n\010template\030\001 \001(\tB\003\340A\003\022\024\n\007vers" - + "ion\030\002 \001(\005B\003\340A\003\022G\n\016create_cluster\030\003 \001(\0132*" - + ".google.cloud.dataproc.v1.ClusterOperati" - + "onB\003\340A\003\022;\n\005graph\030\004 \001(\0132\'.google.cloud.da" - + "taproc.v1.WorkflowGraphB\003\340A\003\022G\n\016delete_c" - + "luster\030\005 \001(\0132*.google.cloud.dataproc.v1." - + "ClusterOperationB\003\340A\003\022D\n\005state\030\006 \001(\01620.g" - + "oogle.cloud.dataproc.v1.WorkflowMetadata" - + ".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.datapr" - + "oc.v1.WorkflowMetadata.ParametersEntry\0223" - + "\n\nstart_time\030\t \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003\0221\n\010end_time\030\n \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\022\031\n\014cluster_uuid\030\013" - + " \001(\tB\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\014operation_id\030\001 \001(\t" - + "B\003\340A\003\022\022\n\005error\030\002 \001(\tB\003\340A\003\022\021\n\004done\030\003 \001(\010B" - + "\003\340A\003\"K\n\rWorkflowGraph\022:\n\005nodes\030\001 \003(\0132&.g" - + "oogle.cloud.dataproc.v1.WorkflowNodeB\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\006" - + "job_id\030\003 \001(\tB\003\340A\003\022D\n\005state\030\005 \001(\01620.googl" - + "e.cloud.dataproc.v1.WorkflowNode.NodeSta" - + "teB\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\tCOMPLETE" - + "D\020\004\022\n\n\006FAILED\020\005\"\244\001\n\035CreateWorkflowTempla" - + "teRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(datap" - + "roc.googleapis.com/WorkflowTemplate\022A\n\010t" - + "emplate\030\002 \001(\0132*.google.cloud.dataproc.v1" - + ".WorkflowTemplateB\003\340A\002\"r\n\032GetWorkflowTem" - + "plateRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(data" - + "proc.googleapis.com/WorkflowTemplate\022\024\n\007" - + "version\030\002 \001(\005B\003\340A\001\"\255\002\n\"InstantiateWorkfl" - + "owTemplateRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n" - + "(dataproc.googleapis.com/WorkflowTemplat" - + "e\022\024\n\007version\030\002 \001(\005B\003\340A\001\022\027\n\nrequest_id\030\005 " - + "\001(\tB\003\340A\001\022e\n\nparameters\030\006 \003(\0132L.google.cl" - + "oud.dataproc.v1.InstantiateWorkflowTempl" - + "ateRequest.ParametersEntryB\003\340A\001\0321\n\017Param" - + "etersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\"\310\001\n(InstantiateInlineWorkflowTemplate" - + "Request\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(datapro" - + "c.googleapis.com/WorkflowTemplate\022A\n\010tem" - + "plate\030\002 \001(\0132*.google.cloud.dataproc.v1.W" - + "orkflowTemplateB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\t" - + "B\003\340A\001\"b\n\035UpdateWorkflowTemplateRequest\022A" - + "\n\010template\030\001 \001(\0132*.google.cloud.dataproc" - + ".v1.WorkflowTemplateB\003\340A\002\"\221\001\n\034ListWorkfl" - + "owTemplatesRequest\022@\n\006parent\030\001 \001(\tB0\340A\002\372" - + "A*\022(dataproc.googleapis.com/WorkflowTemp" - + "late\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_tok" - + "en\030\003 \001(\tB\003\340A\001\"\201\001\n\035ListWorkflowTemplatesR" - + "esponse\022B\n\ttemplates\030\001 \003(\0132*.google.clou" - + "d.dataproc.v1.WorkflowTemplateB\003\340A\003\022\034\n\017n" - + "ext_page_token\030\002 \001(\tB\003\340A\003\"u\n\035DeleteWorkf" - + "lowTemplateRequest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*" - + "\n(dataproc.googleapis.com/WorkflowTempla" - + "te\022\024\n\007version\030\002 \001(\005B\003\340A\0012\346\020\n\027WorkflowTem" - + "plateService\022\233\002\n\026CreateWorkflowTemplate\022" - + "7.google.cloud.dataproc.v1.CreateWorkflo" - + "wTemplateRequest\032*.google.cloud.dataproc" - + ".v1.WorkflowTemplate\"\233\001\202\323\344\223\002\202\001\"5/v1/{par" - + "ent=projects/*/locations/*}/workflowTemp" - + "lates:\010templateZ?\"3/v1/{parent=projects/" - + "*/regions/*}/workflowTemplates:\010template" - + "\332A\017parent,template\022\364\001\n\023GetWorkflowTempla" - + "te\0224.google.cloud.dataproc.v1.GetWorkflo" - + "wTemplateRequest\032*.google.cloud.dataproc" - + ".v1.WorkflowTemplate\"{\202\323\344\223\002n\0225/v1/{name=" - + "projects/*/locations/*/workflowTemplates" - + "/*}Z5\0223/v1/{name=projects/*/regions/*/wo" - + "rkflowTemplates/*}\332A\004name\022\325\002\n\033Instantiat" - + "eWorkflowTemplate\022<.google.cloud.datapro" - + "c.v1.InstantiateWorkflowTemplateRequest\032" - + "\035.google.longrunning.Operation\"\330\001\202\323\344\223\002\214\001" - + "\"A/v1/{name=projects/*/locations/*/workf" - + "lowTemplates/*}:instantiate:\001*ZD\"?/v1/{n" - + "ame=projects/*/regions/*/workflowTemplat" - + "es/*}:instantiate:\001*\332A\004name\332A\017name,param" - + "eters\312A)\n\025google.protobuf.Empty\022\020Workflo" - + "wMetadata\022\364\002\n!InstantiateInlineWorkflowT" - + "emplate\022B.google.cloud.dataproc.v1.Insta" - + "ntiateInlineWorkflowTemplateRequest\032\035.go" - + "ogle.longrunning.Operation\"\353\001\202\323\344\223\002\246\001\"G/v" - + "1/{parent=projects/*/locations/*}/workfl" - + "owTemplates:instantiateInline:\010templateZ" - + "Q\"E/v1/{parent=projects/*/regions/*}/wor" - + "kflowTemplates:instantiateInline:\010templa" - + "te\332A\017parent,template\312A)\n\025google.protobuf" - + ".Empty\022\020WorkflowMetadata\022\246\002\n\026UpdateWorkf" - + "lowTemplate\0227.google.cloud.dataproc.v1.U" - + "pdateWorkflowTemplateRequest\032*.google.cl" - + "oud.dataproc.v1.WorkflowTemplate\"\246\001\202\323\344\223\002" - + "\224\001\032>/v1/{template.name=projects/*/locati" - + "ons/*/workflowTemplates/*}:\010templateZH\032<" - + "/v1/{template.name=projects/*/regions/*/" - + "workflowTemplates/*}:\010template\332A\010templat" - + "e\022\207\002\n\025ListWorkflowTemplates\0226.google.clo" - + "ud.dataproc.v1.ListWorkflowTemplatesRequ" - + "est\0327.google.cloud.dataproc.v1.ListWorkf" - + "lowTemplatesResponse\"}\202\323\344\223\002n\0225/v1/{paren" - + "t=projects/*/locations/*}/workflowTempla" - + "tesZ5\0223/v1/{parent=projects/*/regions/*}" - + "/workflowTemplates\332A\006parent\022\346\001\n\026DeleteWo" - + "rkflowTemplate\0227.google.cloud.dataproc.v" - + "1.DeleteWorkflowTemplateRequest\032\026.google" - + ".protobuf.Empty\"{\202\323\344\223\002n*5/v1/{name=proje" - + "cts/*/locations/*/workflowTemplates/*}Z5" - + "*3/v1/{name=projects/*/regions/*/workflo" - + "wTemplates/*}\332A\004name\032K\312A\027dataproc.google" - + "apis.com\322A.https://www.googleapis.com/au" - + "th/cloud-platformBz\n\034com.google.cloud.da" - + "taproc.v1B\026WorkflowTemplatesProtoP\001Z@goo" - + "gle.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.api.ResourceProto.getDescriptor(), - com.google.cloud.dataproc.v1.ClustersProto.getDescriptor(), - com.google.cloud.dataproc.v1.JobsProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_descriptor, - new java.lang.String[] { - "Id", - "Name", - "Version", - "CreateTime", - "UpdateTime", - "Labels", - "Placement", - "Jobs", - "Parameters", - }); - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowTemplate_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowTemplatePlacement_descriptor, - new java.lang.String[] { - "ManagedCluster", "ClusterSelector", "Placement", - }); - internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1_ManagedCluster_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor, - new java.lang.String[] { - "ClusterName", "Config", "Labels", - }); - internal_static_google_cloud_dataproc_v1_ManagedCluster_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_ManagedCluster_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_ManagedCluster_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ManagedCluster_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1_ClusterSelector_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor, - new java.lang.String[] { - "Zone", "ClusterLabels", - }); - internal_static_google_cloud_dataproc_v1_ClusterSelector_ClusterLabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_ClusterSelector_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_ClusterSelector_ClusterLabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterSelector_ClusterLabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1_OrderedJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor, - new java.lang.String[] { - "StepId", - "HadoopJob", - "SparkJob", - "PysparkJob", - "HiveJob", - "PigJob", - "SparkRJob", - "SparkSqlJob", - "PrestoJob", - "Labels", - "Scheduling", - "PrerequisiteStepIds", - "JobType", - }); - internal_static_google_cloud_dataproc_v1_OrderedJob_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1_OrderedJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1_OrderedJob_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_OrderedJob_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_TemplateParameter_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1_TemplateParameter_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_TemplateParameter_descriptor, - new java.lang.String[] { - "Name", "Fields", "Description", "Validation", - }); - internal_static_google_cloud_dataproc_v1_ParameterValidation_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1_ParameterValidation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ParameterValidation_descriptor, - new java.lang.String[] { - "Regex", "Values", "ValidationType", - }); - internal_static_google_cloud_dataproc_v1_RegexValidation_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1_RegexValidation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_RegexValidation_descriptor, - new java.lang.String[] { - "Regexes", - }); - internal_static_google_cloud_dataproc_v1_ValueValidation_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1_ValueValidation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ValueValidation_descriptor, - new java.lang.String[] { - "Values", - }); - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor, - new java.lang.String[] { - "Template", - "Version", - "CreateCluster", - "Graph", - "DeleteCluster", - "State", - "ClusterName", - "Parameters", - "StartTime", - "EndTime", - "ClusterUuid", - }); - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_ParametersEntry_descriptor = - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_ParametersEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowMetadata_ParametersEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_ClusterOperation_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1_ClusterOperation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ClusterOperation_descriptor, - new java.lang.String[] { - "OperationId", "Error", "Done", - }); - internal_static_google_cloud_dataproc_v1_WorkflowGraph_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_dataproc_v1_WorkflowGraph_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowGraph_descriptor, - new java.lang.String[] { - "Nodes", - }); - internal_static_google_cloud_dataproc_v1_WorkflowNode_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_dataproc_v1_WorkflowNode_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_WorkflowNode_descriptor, - new java.lang.String[] { - "StepId", "PrerequisiteStepIds", "JobId", "State", "Error", - }); - internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_CreateWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Parent", "Template", - }); - internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_GetWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Name", "Version", - }); - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Name", "Version", "RequestId", "Parameters", - }); - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor = - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_ParametersEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_InstantiateInlineWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Parent", "Template", "RequestId", - }); - internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_UpdateWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Template", - }); - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_ListWorkflowTemplatesResponse_descriptor, - new java.lang.String[] { - "Templates", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1_DeleteWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Name", "Version", - }); - 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.ClustersProto.getDescriptor(); - com.google.cloud.dataproc.v1.JobsProto.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/YarnApplication.java b/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplication.java deleted file mode 100644 index 9825ef1b..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/java/com/google/cloud/dataproc/v1/YarnApplication.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; - -/** - * - * - *
- * 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 (!getNameBytes().isEmpty()) { - 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 (!getTrackingUrlBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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 (!getTrackingUrlBytes().isEmpty()) { - 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 bec577e4..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/autoscaling_policies.proto +++ /dev/null @@ -1,355 +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. - -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]; -} - -// 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/clusters.proto b/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto deleted file mode 100644 index ccff3522..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/clusters.proto +++ /dev/null @@ -1,995 +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. - -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/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"; - -// 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). - 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" - }; - } - - // 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 cluster of Compute Engine instances. -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]; - - // Required. The cluster config. Note that Dataproc may set - // default values, and values may change when clusters are updated. - ClusterConfig config = 3 [(google.api.field_behavior) = REQUIRED]; - - // 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 - // bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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. - 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 master instance in a cluster. - InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // worker instances in a cluster. - InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // additional worker instances in a cluster. - InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The config settings for software inside the cluster. - 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]; -} - -// 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 { - // 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 [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]; -} - -// 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 master instance 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-ssd" (Persistent Disk Solid State Drive) or - // "pd-standard" (Persistent Disk Hard Disk Drive). - 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]; -} - -// 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. - RUNNING = 2; - - // The cluster encountered an error. It is not ready for use. - ERROR = 3; - - // 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 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 Kerberos. -message SecurityConfig { - // Kerberos related configuration. - KerberosConfig kerberos_config = 1; -} - -// 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]; - - // Required. The Cloud Storage URI of a KMS encrypted file containing the root - // principal password. - string root_principal_password_uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The uri of the KMS key used to encrypt various sensitive - // files. - string kms_key_uri = 3 [(google.api.field_behavior) = REQUIRED]; - - // 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]; -} - -// 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 10 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]; -} - -// 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][google.cloud.dataproc.v1.CreateClusterRequest] requests 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]; -} - -// 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][google.cloud.dataproc.v1.UpdateClusterRequest] requests 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 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][google.cloud.dataproc.v1.DeleteClusterRequest] requests 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 065530f3..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/jobs.proto +++ /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 -// -// 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](http://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 terminate a query - // with a semicolon. Multiple queries can be specified in one string - // by separating each with a semicolon. Here is an example of an Cloud - // 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]; -} - -// 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 terminating 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. - int32 max_failures_per_hour = 1 [(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][google.cloud.dataproc.v1.SubmitJobRequest] requests 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 724d2a89..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/operations.proto +++ /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 -// -// 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"; -import "google/api/annotations.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"; - -// 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 7a1382f1..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/shared.proto +++ /dev/null @@ -1,48 +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. - -syntax = "proto3"; - -package google.cloud.dataproc.v1; - -import "google/api/annotations.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"; - -// 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. - ANACONDA = 5; - - // 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 Zeppelin notebook. - ZEPPELIN = 4; - - // The Zookeeper service. - ZOOKEEPER = 8; -} 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 04f81004..00000000 --- a/proto-google-cloud-dataproc-v1/src/main/proto/google/cloud/dataproc/v1/workflow_templates.proto +++ /dev/null @@ -1,782 +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. - -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/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]; -} - -// 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]; -} - -// 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 100 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/proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml b/proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml deleted file mode 100644 index afdef514..00000000 --- a/proto-google-cloud-dataproc-v1beta2/clirr-ignored-differences.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 7012 - com/google/cloud/dataproc/v1beta2/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/dataproc/v1beta2/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/dataproc/v1beta2/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-cloud-dataproc-v1beta2/pom.xml b/proto-google-cloud-dataproc-v1beta2/pom.xml deleted file mode 100644 index 30eea8b9..00000000 --- a/proto-google-cloud-dataproc-v1beta2/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-dataproc-v1beta2 - 0.89.2-SNAPSHOT - proto-google-cloud-dataproc-v1beta2 - PROTO library for proto-google-cloud-dataproc-v1beta2 - - com.google.cloud - google-cloud-dataproc-parent - 1.1.2-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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfig.java deleted file mode 100644 index 43e8f023..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfig.java +++ /dev/null @@ -1,814 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies the type and number of accelerator cards attached to the instances
- * of an instance group (see [GPUs on Compute
- * Engine](https://cloud.google.com/compute/docs/gpus/)).
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.AcceleratorConfig} - */ -public final class AcceleratorConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.AcceleratorConfig.class, - com.google.cloud.dataproc.v1beta2.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 (!getAcceleratorTypeUriBytes().isEmpty()) { - 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 (!getAcceleratorTypeUriBytes().isEmpty()) { - 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.v1beta2.AcceleratorConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.AcceleratorConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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 group (see [GPUs on Compute
-   * Engine](https://cloud.google.com/compute/docs/gpus/)).
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.AcceleratorConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.AcceleratorConfig) - com.google.cloud.dataproc.v1beta2.AcceleratorConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.AcceleratorConfig.class, - com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.AcceleratorConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig build() { - com.google.cloud.dataproc.v1beta2.AcceleratorConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.AcceleratorConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.AcceleratorConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.AcceleratorConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.AcceleratorConfig) - private static final com.google.cloud.dataproc.v1beta2.AcceleratorConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.AcceleratorConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AcceleratorConfigOrBuilder.java deleted file mode 100644 index bac648d0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface AcceleratorConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfig.java deleted file mode 100644 index 9c631151..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfig.java +++ /dev/null @@ -1,671 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Autoscaling Policy config associated with the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.AutoscalingConfig} - */ -public final class AutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.class, - com.google.cloud.dataproc.v1beta2.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 (!getPolicyUriBytes().isEmpty()) { - 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 (!getPolicyUriBytes().isEmpty()) { - 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.v1beta2.AutoscalingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.AutoscalingConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AutoscalingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.AutoscalingConfig) - com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.class, - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.AutoscalingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingConfig build() { - com.google.cloud.dataproc.v1beta2.AutoscalingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.AutoscalingConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.AutoscalingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.AutoscalingConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.AutoscalingConfig) - private static final com.google.cloud.dataproc.v1beta2.AutoscalingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.AutoscalingConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingConfigOrBuilder.java deleted file mode 100644 index 03a5f9bd..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface AutoscalingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java deleted file mode 100644 index 096b7f2e..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPoliciesProto.java +++ /dev/null @@ -1,294 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -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_v1beta2_AutoscalingPolicy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_AutoscalingPolicy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_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 = { - "\n8google/cloud/dataproc/v1beta2/autoscal" - + "ing_policies.proto\022\035google.cloud.datapro" - + "c.v1beta2\032\034google/api/annotations.proto\032" - + "\027google/api/client.proto\032\037google/api/fie" - + "ld_behavior.proto\032\031google/api/resource.p" - + "roto\032\036google/protobuf/duration.proto\032\033go" - + "ogle/protobuf/empty.proto\"\271\004\n\021Autoscalin" - + "gPolicy\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\021\n\004name\030\002 \001(\tB\003" - + "\340A\003\022S\n\017basic_algorithm\030\003 \001(\01328.google.cl" - + "oud.dataproc.v1beta2.BasicAutoscalingAlg" - + "orithmH\000\022_\n\rworker_config\030\004 \001(\0132C.google" - + ".cloud.dataproc.v1beta2.InstanceGroupAut" - + "oscalingPolicyConfigB\003\340A\002\022i\n\027secondary_w" - + "orker_config\030\005 \001(\0132C.google.cloud.datapr" - + "oc.v1beta2.InstanceGroupAutoscalingPolic" - + "yConfigB\003\340A\001:\321\001\352A\315\001\n)dataproc.googleapis" - + ".com/AutoscalingPolicy\022Pprojects/{projec" - + "t}/locations/{location}/autoscalingPolic" - + "ies/{autoscaling_policy}\022Lprojects/{proj" - + "ect}/regions/{region}/autoscalingPolicie" - + "s/{autoscaling_policy} \001B\013\n\talgorithm\"\251\001" - + "\n\031BasicAutoscalingAlgorithm\022S\n\013yarn_conf" - + "ig\030\001 \001(\01329.google.cloud.dataproc.v1beta2" - + ".BasicYarnAutoscalingConfigB\003\340A\002\0227\n\017cool" - + "down_period\030\002 \001(\0132\031.google.protobuf.Dura" - + "tionB\003\340A\001\"\371\001\n\032BasicYarnAutoscalingConfig" - + "\022E\n\035graceful_decommission_timeout\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\021scale_down_fact" - + "or\030\002 \001(\001B\003\340A\002\022)\n\034scale_up_min_worker_fra" - + "ction\030\003 \001(\001B\003\340A\001\022+\n\036scale_down_min_worke" - + "r_fraction\030\004 \001(\001B\003\340A\001\"s\n$InstanceGroupAu" - + "toscalingPolicyConfig\022\032\n\rmin_instances\030\001" - + " \001(\005B\003\340A\001\022\032\n\rmax_instances\030\002 \001(\005B\003\340A\001\022\023\n" - + "\006weight\030\003 \001(\005B\003\340A\001\"\252\001\n\036CreateAutoscaling" - + "PolicyRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)d" - + "ataproc.googleapis.com/AutoscalingPolicy" - + "\022E\n\006policy\030\002 \001(\01320.google.cloud.dataproc" - + ".v1beta2.AutoscalingPolicyB\003\340A\002\"^\n\033GetAu" - + "toscalingPolicyRequest\022?\n\004name\030\001 \001(\tB1\340A" - + "\002\372A+\n)dataproc.googleapis.com/Autoscalin" - + "gPolicy\"g\n\036UpdateAutoscalingPolicyReques" - + "t\022E\n\006policy\030\001 \001(\01320.google.cloud.datapro" - + "c.v1beta2.AutoscalingPolicyB\003\340A\002\"a\n\036Dele" - + "teAutoscalingPolicyRequest\022?\n\004name\030\001 \001(\t" - + "B1\340A\002\372A+\n)dataproc.googleapis.com/Autosc" - + "alingPolicy\"\224\001\n\036ListAutoscalingPoliciesR" - + "equest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)dataproc" - + ".googleapis.com/AutoscalingPolicy\022\026\n\tpag" - + "e_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340" - + "A\001\"\210\001\n\037ListAutoscalingPoliciesResponse\022G" - + "\n\010policies\030\001 \003(\01320.google.cloud.dataproc" - + ".v1beta2.AutoscalingPolicyB\003\340A\003\022\034\n\017next_" - + "page_token\030\002 \001(\tB\003\340A\0032\217\014\n\030AutoscalingPol" - + "icyService\022\260\002\n\027CreateAutoscalingPolicy\022=" - + ".google.cloud.dataproc.v1beta2.CreateAut" - + "oscalingPolicyRequest\0320.google.cloud.dat" - + "aproc.v1beta2.AutoscalingPolicy\"\243\001\202\323\344\223\002\214" - + "\001\"." - + "google.cloud.dataproc.v1beta2.ListAutosc" - + "alingPoliciesResponse\"\213\001\202\323\344\223\002|\022 - * Describes an autoscaling policy for Dataproc cluster autoscaler. - * - * - * Protobuf type {@code google.cloud.dataproc.v1beta2.AutoscalingPolicy} - */ -public final class AutoscalingPolicy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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(); - } - 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.v1beta2.BasicAutoscalingAlgorithm.Builder subBuilder = null; - if (algorithmCase_ == 3) { - subBuilder = - ((com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_) - .toBuilder(); - } - algorithm_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_); - algorithm_ = subBuilder.buildPartial(); - } - algorithmCase_ = 3; - break; - } - case 34: - { - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder - subBuilder = null; - if (workerConfig_ != null) { - subBuilder = workerConfig_.toBuilder(); - } - workerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(workerConfig_); - workerConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder - subBuilder = null; - if (secondaryWorkerConfig_ != null) { - subBuilder = secondaryWorkerConfig_.toBuilder(); - } - secondaryWorkerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(secondaryWorkerConfig_); - secondaryWorkerConfig_ = 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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingPolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class, - com.google.cloud.dataproc.v1beta2.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 [(.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; - } - } - /** - * - * - *
-   * 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 [(.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 = 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.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - * - * @return Whether the basicAlgorithm field is set. - */ - @java.lang.Override - public boolean hasBasicAlgorithm() { - return algorithmCase_ == 3; - } - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - * - * @return The basicAlgorithm. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm getBasicAlgorithm() { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder - getBasicAlgorithmOrBuilder() { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - - public static final int WORKER_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig workerConfig_; - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig getWorkerConfig() { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance() - : workerConfig_; - } - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder - getWorkerConfigOrBuilder() { - return getWorkerConfig(); - } - - public static final int SECONDARY_WORKER_CONFIG_FIELD_NUMBER = 5; - private com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - secondaryWorkerConfig_; - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - getSecondaryWorkerConfig() { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance() - : secondaryWorkerConfig_; - } - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - return getSecondaryWorkerConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } - if (algorithmCase_ == 3) { - output.writeMessage( - 3, (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_); - } - if (workerConfig_ != null) { - output.writeMessage(4, getWorkerConfig()); - } - if (secondaryWorkerConfig_ != null) { - output.writeMessage(5, getSecondaryWorkerConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (algorithmCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_); - } - if (workerConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getWorkerConfig()); - } - if (secondaryWorkerConfig_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSecondaryWorkerConfig()); - } - 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.v1beta2.AutoscalingPolicy)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy other = - (com.google.cloud.dataproc.v1beta2.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 (!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(); - } - 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.v1beta2.AutoscalingPolicy parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.AutoscalingPolicy) - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingPolicy_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingPolicy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - } - algorithmCase_ = 0; - algorithm_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_AutoscalingPolicy_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy build() { - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy buildPartial() { - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy result = - new com.google.cloud.dataproc.v1beta2.AutoscalingPolicy(this); - 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.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.v1beta2.AutoscalingPolicy) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.AutoscalingPolicy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy other) { - if (other == com.google.cloud.dataproc.v1beta2.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()); - } - 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.v1beta2.AutoscalingPolicy parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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 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 [(.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; - } - } - /** - * - * - *
-     * 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 [(.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; - } - } - /** - * - * - *
-     * 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 [(.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; - } - /** - * - * - *
-     * 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 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 [(.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 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.v1beta2.BasicAutoscalingAlgorithm, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder> - basicAlgorithmBuilder_; - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - * - * @return Whether the basicAlgorithm field is set. - */ - @java.lang.Override - public boolean hasBasicAlgorithm() { - return algorithmCase_ == 3; - } - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - * - * @return The basicAlgorithm. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm getBasicAlgorithm() { - if (basicAlgorithmBuilder_ == null) { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } else { - if (algorithmCase_ == 3) { - return basicAlgorithmBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - } - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - public Builder setBasicAlgorithm( - com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - public Builder setBasicAlgorithm( - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder builderForValue) { - if (basicAlgorithmBuilder_ == null) { - algorithm_ = builderForValue.build(); - onChanged(); - } else { - basicAlgorithmBuilder_.setMessage(builderForValue.build()); - } - algorithmCase_ = 3; - return this; - } - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - public Builder mergeBasicAlgorithm( - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm value) { - if (basicAlgorithmBuilder_ == null) { - if (algorithmCase_ == 3 - && algorithm_ - != com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm - .getDefaultInstance()) { - algorithm_ = - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - 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.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder - getBasicAlgorithmBuilder() { - return getBasicAlgorithmFieldBuilder().getBuilder(); - } - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder - getBasicAlgorithmOrBuilder() { - if ((algorithmCase_ == 3) && (basicAlgorithmBuilder_ != null)) { - return basicAlgorithmBuilder_.getMessageOrBuilder(); - } else { - if (algorithmCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_; - } - return com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - } - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder> - getBasicAlgorithmFieldBuilder() { - if (basicAlgorithmBuilder_ == null) { - if (!(algorithmCase_ == 3)) { - algorithm_ = - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - basicAlgorithmBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder>( - (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) algorithm_, - getParentForChildren(), - isClean()); - algorithm_ = null; - } - algorithmCase_ = 3; - onChanged(); - ; - return basicAlgorithmBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig workerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder> - workerConfigBuilder_; - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workerConfig. - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - getWorkerConfig() { - if (workerConfigBuilder_ == null) { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance() - : workerConfig_; - } else { - return workerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkerConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkerConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeWorkerConfig( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig value) { - if (workerConfigBuilder_ == null) { - if (workerConfig_ != null) { - workerConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder - getWorkerConfigBuilder() { - - onChanged(); - return getWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder - getWorkerConfigOrBuilder() { - if (workerConfigBuilder_ != null) { - return workerConfigBuilder_.getMessageOrBuilder(); - } else { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance() - : workerConfig_; - } - } - /** - * - * - *
-     * Required. Describes how the autoscaler will operate for primary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder> - getWorkerConfigFieldBuilder() { - if (workerConfigBuilder_ == null) { - workerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder>( - getWorkerConfig(), getParentForChildren(), isClean()); - workerConfig_ = null; - } - return workerConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - secondaryWorkerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder> - secondaryWorkerConfigBuilder_; - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - getSecondaryWorkerConfig() { - if (secondaryWorkerConfigBuilder_ == null) { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance() - : secondaryWorkerConfig_; - } else { - return secondaryWorkerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSecondaryWorkerConfig( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig value) { - if (secondaryWorkerConfigBuilder_ == null) { - if (secondaryWorkerConfig_ != null) { - secondaryWorkerConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder - getSecondaryWorkerConfigBuilder() { - - onChanged(); - return getSecondaryWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - if (secondaryWorkerConfigBuilder_ != null) { - return secondaryWorkerConfigBuilder_.getMessageOrBuilder(); - } else { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance() - : secondaryWorkerConfig_; - } - } - /** - * - * - *
-     * Optional. Describes how the autoscaler will operate for secondary workers.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder> - getSecondaryWorkerConfigFieldBuilder() { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder>( - getSecondaryWorkerConfig(), getParentForChildren(), isClean()); - secondaryWorkerConfig_ = null; - } - return secondaryWorkerConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.AutoscalingPolicy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.AutoscalingPolicy) - private static final com.google.cloud.dataproc.v1beta2.AutoscalingPolicy DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.AutoscalingPolicy(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyName.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyName.java deleted file mode 100644 index a7b158d2..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyName.java +++ /dev/null @@ -1,363 +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.v1beta2; - -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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class AutoscalingPolicyName implements ResourceName { - - @Deprecated - protected AutoscalingPolicyName() {} - - private static final PathTemplate PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}"); - private static final PathTemplate PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/regions/{region}/autoscalingPolicies/{autoscaling_policy}"); - - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - - private String project; - private String location; - private String autoscalingPolicy; - private String region; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getAutoscalingPolicy() { - return autoscalingPolicy; - } - - public String getRegion() { - return region; - } - - private AutoscalingPolicyName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy()); - pathTemplate = PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE; - } - - private AutoscalingPolicyName(ProjectRegionAutoscalingPolicyBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - autoscalingPolicy = Preconditions.checkNotNull(builder.getAutoscalingPolicy()); - pathTemplate = PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE; - } - - 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 newProjectLocationAutoscalingPolicyBuilder() - .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 newProjectLocationAutoscalingPolicyBuilder() - .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_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString); - return ofProjectLocationAutoscalingPolicyName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("autoscaling_policy")); - } else if (PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_REGION_AUTOSCALING_POLICY_PATH_TEMPLATE.match(formattedString); - return ofProjectRegionAutoscalingPolicyName( - matchMap.get("project"), matchMap.get("region"), matchMap.get("autoscaling_policy")); - } - throw new ValidationException("JobName.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_PATH_TEMPLATE.matches(formattedString) - || PROJECT_REGION_AUTOSCALING_POLICY_PATH_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 (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()); - } - - /** - * 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( - autoscalingPolicyName.pathTemplate == PROJECT_LOCATION_AUTOSCALING_POLICY_PATH_TEMPLATE, - "toBuilder is only supported when AutoscalingPolicyName has the pattern of " - + "projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}."); - project = autoscalingPolicyName.project; - location = autoscalingPolicyName.location; - 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; - - private 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); - } - } - - @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; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyOrBuilder.java deleted file mode 100644 index 11a1efb9..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/AutoscalingPolicyOrBuilder.java +++ /dev/null @@ -1,196 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface AutoscalingPolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 [(.google.api.field_behavior) = REQUIRED]; - * - * @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.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - * - * @return Whether the basicAlgorithm field is set. - */ - boolean hasBasicAlgorithm(); - /** - * .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; - * - * @return The basicAlgorithm. - */ - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm getBasicAlgorithm(); - /** .google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm basic_algorithm = 3; */ - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder getBasicAlgorithmOrBuilder(); - - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workerConfig. - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig getWorkerConfig(); - /** - * - * - *
-   * Required. Describes how the autoscaler will operate for primary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder - getWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig getSecondaryWorkerConfig(); - /** - * - * - *
-   * Optional. Describes how the autoscaler will operate for secondary workers.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder - getSecondaryWorkerConfigOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.AlgorithmCase getAlgorithmCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithm.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithm.java deleted file mode 100644 index 86617fd6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithm.java +++ /dev/null @@ -1,1087 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Basic algorithm for autoscaling.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm} - */ -public final class BasicAutoscalingAlgorithm extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig.Builder subBuilder = - null; - if (yarnConfig_ != null) { - subBuilder = yarnConfig_.toBuilder(); - } - yarnConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.class, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder.class); - } - - public static final int YARN_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarnConfig_; - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The yarnConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig getYarnConfig() { - return yarnConfig_ == null - ? com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.getDefaultInstance() - : yarnConfig_; - } - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithmOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.class, - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicAutoscalingAlgorithm_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm build() { - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm buildPartial() { - com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarnConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig, - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfigOrBuilder> - yarnConfigBuilder_; - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The yarnConfig. - */ - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig getYarnConfig() { - if (yarnConfigBuilder_ == null) { - return yarnConfig_ == null - ? com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.getDefaultInstance() - : yarnConfig_; - } else { - return yarnConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setYarnConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setYarnConfig( - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.Builder builderForValue) { - if (yarnConfigBuilder_ == null) { - yarnConfig_ = builderForValue.build(); - onChanged(); - } else { - yarnConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeYarnConfig( - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig value) { - if (yarnConfigBuilder_ == null) { - if (yarnConfig_ != null) { - yarnConfig_ = - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.newBuilder(yarnConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - yarnConfig_ = value; - } - onChanged(); - } else { - yarnConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.Builder - getYarnConfigBuilder() { - - onChanged(); - return getYarnConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfigOrBuilder - getYarnConfigOrBuilder() { - if (yarnConfigBuilder_ != null) { - return yarnConfigBuilder_.getMessageOrBuilder(); - } else { - return yarnConfig_ == null - ? com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.getDefaultInstance() - : yarnConfig_; - } - } - /** - * - * - *
-     * Required. YARN autoscaling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig, - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfigOrBuilder> - getYarnConfigFieldBuilder() { - if (yarnConfigBuilder_ == null) { - yarnConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig, - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) - private static final com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicAutoscalingAlgorithm getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithmOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicAutoscalingAlgorithmOrBuilder.java deleted file mode 100644 index bb27342e..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface BasicAutoscalingAlgorithmOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.BasicAutoscalingAlgorithm) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The yarnConfig. - */ - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig getYarnConfig(); - /** - * - * - *
-   * Required. YARN autoscaling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig yarn_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfig.java deleted file mode 100644 index 31f1bcb0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfig.java +++ /dev/null @@ -1,1276 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Basic autoscaling configurations for YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig} - */ -public final class BasicYarnAutoscalingConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.class, - com.google.cloud.dataproc.v1beta2.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 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).
-   * 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 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.
-   * 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.v1beta2.BasicYarnAutoscalingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig) - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.class, - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_BasicYarnAutoscalingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig build() { - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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 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).
-     * 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 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).
-     * 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 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).
-     * 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 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.
-     * 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 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.
-     * 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 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.
-     * 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.v1beta2.BasicYarnAutoscalingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig) - private static final com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.BasicYarnAutoscalingConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.BasicYarnAutoscalingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfigOrBuilder.java deleted file mode 100644 index 25de99ad..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/BasicYarnAutoscalingConfigOrBuilder.java +++ /dev/null @@ -1,151 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface BasicYarnAutoscalingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 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).
-   * Bounds: [0.0, 1.0].
-   * 
- * - * double scale_up_factor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scaleUpFactor. - */ - double getScaleUpFactor(); - - /** - * - * - *
-   * Required. Fraction of average 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.
-   * 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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequest.java deleted file mode 100644 index 9743d2a1..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequest.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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to cancel a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.CancelJobRequest} - */ -public final class CancelJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CancelJobRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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.v1beta2.CancelJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.CancelJobRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.CancelJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.CancelJobRequest) - com.google.cloud.dataproc.v1beta2.CancelJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CancelJobRequest.class, - com.google.cloud.dataproc.v1beta2.CancelJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CancelJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.CancelJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CancelJobRequest build() { - com.google.cloud.dataproc.v1beta2.CancelJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CancelJobRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.CancelJobRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.CancelJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.CancelJobRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.CancelJobRequest) - private static final com.google.cloud.dataproc.v1beta2.CancelJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.CancelJobRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CancelJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CancelJobRequestOrBuilder.java deleted file mode 100644 index 85b39ae8..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface CancelJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Cluster.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Cluster.java deleted file mode 100644 index e3ad6756..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Cluster.java +++ /dev/null @@ -1,2887 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Describes the identifying information, config, and status of
- * a cluster of Compute Engine instances.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.Cluster} - */ -public final class Cluster extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ClusterConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterMetrics.Builder subBuilder = null; - if (metrics_ != null) { - subBuilder = metrics_.toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ClusterMetrics.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metrics_); - metrics_ = 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_Cluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.Cluster.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig config_; - /** - * - * - *
-   * Required. The cluster config. Note that Dataproc may set
-   * default values, and values may change when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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 config. Note that Dataproc may set
-   * default values, and values may change when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The config. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterConfig getConfig() { - return config_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * Required. The cluster config. Note that Dataproc may set
-   * default values, and values may change when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder getConfigOrBuilder() { - return getConfig(); - } - - 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClusterStatus status_; - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus getStatus() { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterStatus.getDefaultInstance() - : status_; - } - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus getStatusHistory(int index) { - return statusHistory_.get(index); - } - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metrics. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterMetrics getMetrics() { - return metrics_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (config_ != null) { - output.writeMessage(3, getConfig()); - } - if (status_ != null) { - output.writeMessage(4, getStatus()); - } - if (!getClusterUuidBytes().isEmpty()) { - 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()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterUuidBytes().isEmpty()) { - 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()); - } - 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.v1beta2.Cluster)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.Cluster other = - (com.google.cloud.dataproc.v1beta2.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 (!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 (!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.v1beta2.Cluster parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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 cluster of Compute Engine instances.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.Cluster} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.Cluster) - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_Cluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.Cluster.class, - com.google.cloud.dataproc.v1beta2.Cluster.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - } - 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_Cluster_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Cluster getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Cluster build() { - com.google.cloud.dataproc.v1beta2.Cluster result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Cluster buildPartial() { - com.google.cloud.dataproc.v1beta2.Cluster result = - new com.google.cloud.dataproc.v1beta2.Cluster(this); - int from_bitField0_ = bitField0_; - result.projectId_ = projectId_; - result.clusterName_ = clusterName_; - if (configBuilder_ == null) { - result.config_ = config_; - } else { - result.config_ = configBuilder_.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.v1beta2.Cluster) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.Cluster) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.Cluster other) { - if (other == com.google.cloud.dataproc.v1beta2.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()); - } - 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.v1beta2.Cluster parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterConfig, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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 config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The config. - */ - public com.google.cloud.dataproc.v1beta2.ClusterConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setConfig(com.google.cloud.dataproc.v1beta2.ClusterConfig value) { - if (configBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - config_ = value; - onChanged(); - } else { - configBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setConfig( - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeConfig(com.google.cloud.dataproc.v1beta2.ClusterConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.dataproc.v1beta2.ClusterConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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 config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * Required. The cluster config. Note that Dataproc may set
-     * default values, and values may change when clusters are updated.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterConfig, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterConfig, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.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 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.v1beta2.ClusterStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterStatus, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1beta2.ClusterStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus( - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1beta2.ClusterStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1beta2.ClusterStatus.newBuilder(status_) - .mergeFrom(value) - .buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. Cluster status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterStatus, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterStatus, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder> - statusHistoryBuilder_; - - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder getStatusHistoryBuilder( - int index) { - return getStatusHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder addStatusHistoryBuilder() { - return getStatusHistoryFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.ClusterStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder addStatusHistoryBuilder( - int index) { - return getStatusHistoryFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1beta2.ClusterStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous cluster status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder> - getStatusHistoryFieldBuilder() { - if (statusHistoryBuilder_ == null) { - statusHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterStatus, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterMetrics, - com.google.cloud.dataproc.v1beta2.ClusterMetrics.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metrics. - */ - public com.google.cloud.dataproc.v1beta2.ClusterMetrics getMetrics() { - if (metricsBuilder_ == null) { - return metrics_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetrics(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setMetrics( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeMetrics(com.google.cloud.dataproc.v1beta2.ClusterMetrics value) { - if (metricsBuilder_ == null) { - if (metrics_ != null) { - metrics_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterMetricsOrBuilder getMetricsOrBuilder() { - if (metricsBuilder_ != null) { - return metricsBuilder_.getMessageOrBuilder(); - } else { - return metrics_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterMetrics, - com.google.cloud.dataproc.v1beta2.ClusterMetrics.Builder, - com.google.cloud.dataproc.v1beta2.ClusterMetricsOrBuilder> - getMetricsFieldBuilder() { - if (metricsBuilder_ == null) { - metricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterMetrics, - com.google.cloud.dataproc.v1beta2.ClusterMetrics.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.Cluster) - private static final com.google.cloud.dataproc.v1beta2.Cluster DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.Cluster(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfig.java deleted file mode 100644 index 1526c99a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfig.java +++ /dev/null @@ -1,4960 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The cluster config.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ClusterConfig} - */ -public final class ClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - 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 66: - { - com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder subBuilder = null; - if (gceClusterConfig_ != null) { - subBuilder = gceClusterConfig_.toBuilder(); - } - gceClusterConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.GceClusterConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gceClusterConfig_); - gceClusterConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder subBuilder = null; - if (masterConfig_ != null) { - subBuilder = masterConfig_.toBuilder(); - } - masterConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(masterConfig_); - masterConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder subBuilder = null; - if (workerConfig_ != null) { - subBuilder = workerConfig_.toBuilder(); - } - workerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction>(); - mutable_bitField0_ |= 0x00000001; - } - initializationActions_.add( - input.readMessage( - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.parser(), - extensionRegistry)); - break; - } - case 98: - { - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder subBuilder = null; - if (secondaryWorkerConfig_ != null) { - subBuilder = secondaryWorkerConfig_.toBuilder(); - } - secondaryWorkerConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(secondaryWorkerConfig_); - secondaryWorkerConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder subBuilder = null; - if (softwareConfig_ != null) { - subBuilder = softwareConfig_.toBuilder(); - } - softwareConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SoftwareConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(softwareConfig_); - softwareConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 114: - { - com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder subBuilder = null; - if (lifecycleConfig_ != null) { - subBuilder = lifecycleConfig_.toBuilder(); - } - lifecycleConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.LifecycleConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lifecycleConfig_); - lifecycleConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.dataproc.v1beta2.EncryptionConfig.Builder subBuilder = null; - if (encryptionConfig_ != null) { - subBuilder = encryptionConfig_.toBuilder(); - } - encryptionConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.EncryptionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(encryptionConfig_); - encryptionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 130: - { - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.Builder subBuilder = null; - if (autoscalingConfig_ != null) { - subBuilder = autoscalingConfig_.toBuilder(); - } - autoscalingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalingConfig_); - autoscalingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 138: - { - com.google.cloud.dataproc.v1beta2.EndpointConfig.Builder subBuilder = null; - if (endpointConfig_ != null) { - subBuilder = endpointConfig_.toBuilder(); - } - endpointConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.EndpointConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointConfig_); - endpointConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 146: - { - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder subBuilder = null; - if (securityConfig_ != null) { - subBuilder = securityConfig_.toBuilder(); - } - securityConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SecurityConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityConfig_); - securityConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 154: - { - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder subBuilder = null; - if (gkeClusterConfig_ != null) { - subBuilder = gkeClusterConfig_.toBuilder(); - } - gkeClusterConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gkeClusterConfig_); - gkeClusterConfig_ = 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterConfig.class, - com.google.cloud.dataproc.v1beta2.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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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 GCE_CLUSTER_CONFIG_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1beta2.GceClusterConfig gceClusterConfig_; - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gceClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GceClusterConfig getGceClusterConfig() { - return gceClusterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.GceClusterConfig.getDefaultInstance() - : gceClusterConfig_; - } - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder - getGceClusterConfigOrBuilder() { - return getGceClusterConfig(); - } - - public static final int MASTER_CONFIG_FIELD_NUMBER = 9; - private com.google.cloud.dataproc.v1beta2.InstanceGroupConfig masterConfig_; - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the master instance in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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 master instance in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The masterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getMasterConfig() { - return masterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : masterConfig_; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the master instance in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder getMasterConfigOrBuilder() { - return getMasterConfig(); - } - - public static final int WORKER_CONFIG_FIELD_NUMBER = 10; - private com.google.cloud.dataproc.v1beta2.InstanceGroupConfig workerConfig_; - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-   * worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The workerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getWorkerConfig() { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : workerConfig_; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder getWorkerConfigOrBuilder() { - return getWorkerConfig(); - } - - public static final int SECONDARY_WORKER_CONFIG_FIELD_NUMBER = 12; - private com.google.cloud.dataproc.v1beta2.InstanceGroupConfig secondaryWorkerConfig_; - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * additional worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getSecondaryWorkerConfig() { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * additional worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - return getSecondaryWorkerConfig(); - } - - public static final int SOFTWARE_CONFIG_FIELD_NUMBER = 13; - private com.google.cloud.dataproc.v1beta2.SoftwareConfig softwareConfig_; - /** - * - * - *
-   * Optional. The config settings for software inside the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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 software inside the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The softwareConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SoftwareConfig getSoftwareConfig() { - return softwareConfig_ == null - ? com.google.cloud.dataproc.v1beta2.SoftwareConfig.getDefaultInstance() - : softwareConfig_; - } - /** - * - * - *
-   * Optional. The config settings for software inside the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder getSoftwareConfigOrBuilder() { - return getSoftwareConfig(); - } - - public static final int LIFECYCLE_CONFIG_FIELD_NUMBER = 14; - private com.google.cloud.dataproc.v1beta2.LifecycleConfig lifecycleConfig_; - /** - * - * - *
-   * Optional. The config setting for auto delete cluster schedule.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the lifecycleConfig field is set. - */ - @java.lang.Override - public boolean hasLifecycleConfig() { - return lifecycleConfig_ != null; - } - /** - * - * - *
-   * Optional. The config setting for auto delete cluster schedule.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The lifecycleConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LifecycleConfig getLifecycleConfig() { - return lifecycleConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LifecycleConfig.getDefaultInstance() - : lifecycleConfig_; - } - /** - * - * - *
-   * Optional. The config setting for auto delete cluster schedule.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder getLifecycleConfigOrBuilder() { - return getLifecycleConfig(); - } - - 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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder> - 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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder - getInitializationActionsOrBuilder(int index) { - return initializationActions_.get(index); - } - - public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 15; - private com.google.cloud.dataproc.v1beta2.EncryptionConfig encryptionConfig_; - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EncryptionConfig getEncryptionConfig() { - return encryptionConfig_ == null - ? com.google.cloud.dataproc.v1beta2.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder - getEncryptionConfigOrBuilder() { - return getEncryptionConfig(); - } - - public static final int AUTOSCALING_CONFIG_FIELD_NUMBER = 16; - private com.google.cloud.dataproc.v1beta2.AutoscalingConfig autoscalingConfig_; - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscalingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingConfig getAutoscalingConfig() { - return autoscalingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder - getAutoscalingConfigOrBuilder() { - return getAutoscalingConfig(); - } - - public static final int ENDPOINT_CONFIG_FIELD_NUMBER = 17; - private com.google.cloud.dataproc.v1beta2.EndpointConfig endpointConfig_; - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.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.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endpointConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EndpointConfig getEndpointConfig() { - return endpointConfig_ == null - ? com.google.cloud.dataproc.v1beta2.EndpointConfig.getDefaultInstance() - : endpointConfig_; - } - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder getEndpointConfigOrBuilder() { - return getEndpointConfig(); - } - - public static final int SECURITY_CONFIG_FIELD_NUMBER = 18; - private com.google.cloud.dataproc.v1beta2.SecurityConfig securityConfig_; - /** - * - * - *
-   * Optional. Security related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the securityConfig field is set. - */ - @java.lang.Override - public boolean hasSecurityConfig() { - return securityConfig_ != null; - } - /** - * - * - *
-   * Optional. Security related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The securityConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SecurityConfig getSecurityConfig() { - return securityConfig_ == null - ? com.google.cloud.dataproc.v1beta2.SecurityConfig.getDefaultInstance() - : securityConfig_; - } - /** - * - * - *
-   * Optional. Security related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder getSecurityConfigOrBuilder() { - return getSecurityConfig(); - } - - public static final int GKE_CLUSTER_CONFIG_FIELD_NUMBER = 19; - private com.google.cloud.dataproc.v1beta2.GkeClusterConfig gkeClusterConfig_; - /** - * - * - *
-   * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-   * Setting this is considered mutually exclusive with Compute Engine-based
-   * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-   * `secondary_worker_config`, and `autoscaling_config`.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gkeClusterConfig field is set. - */ - @java.lang.Override - public boolean hasGkeClusterConfig() { - return gkeClusterConfig_ != null; - } - /** - * - * - *
-   * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-   * Setting this is considered mutually exclusive with Compute Engine-based
-   * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-   * `secondary_worker_config`, and `autoscaling_config`.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gkeClusterConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig getGkeClusterConfig() { - return gkeClusterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.GkeClusterConfig.getDefaultInstance() - : gkeClusterConfig_; - } - /** - * - * - *
-   * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-   * Setting this is considered mutually exclusive with Compute Engine-based
-   * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-   * `secondary_worker_config`, and `autoscaling_config`.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder - getGkeClusterConfigOrBuilder() { - return getGkeClusterConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getConfigBucketBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, configBucket_); - } - 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 (lifecycleConfig_ != null) { - output.writeMessage(14, getLifecycleConfig()); - } - if (encryptionConfig_ != null) { - output.writeMessage(15, getEncryptionConfig()); - } - if (autoscalingConfig_ != null) { - output.writeMessage(16, getAutoscalingConfig()); - } - if (endpointConfig_ != null) { - output.writeMessage(17, getEndpointConfig()); - } - if (securityConfig_ != null) { - output.writeMessage(18, getSecurityConfig()); - } - if (gkeClusterConfig_ != null) { - output.writeMessage(19, getGkeClusterConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getConfigBucketBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, configBucket_); - } - 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 (lifecycleConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getLifecycleConfig()); - } - if (encryptionConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getEncryptionConfig()); - } - if (autoscalingConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getAutoscalingConfig()); - } - if (endpointConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getEndpointConfig()); - } - if (securityConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getSecurityConfig()); - } - if (gkeClusterConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getGkeClusterConfig()); - } - 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.v1beta2.ClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterConfig other = - (com.google.cloud.dataproc.v1beta2.ClusterConfig) obj; - - if (!getConfigBucket().equals(other.getConfigBucket())) 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 (hasLifecycleConfig() != other.hasLifecycleConfig()) return false; - if (hasLifecycleConfig()) { - if (!getLifecycleConfig().equals(other.getLifecycleConfig())) 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 (hasEndpointConfig() != other.hasEndpointConfig()) return false; - if (hasEndpointConfig()) { - if (!getEndpointConfig().equals(other.getEndpointConfig())) return false; - } - if (hasSecurityConfig() != other.hasSecurityConfig()) return false; - if (hasSecurityConfig()) { - if (!getSecurityConfig().equals(other.getSecurityConfig())) return false; - } - if (hasGkeClusterConfig() != other.hasGkeClusterConfig()) return false; - if (hasGkeClusterConfig()) { - if (!getGkeClusterConfig().equals(other.getGkeClusterConfig())) 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(); - 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 (hasLifecycleConfig()) { - hash = (37 * hash) + LIFECYCLE_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getLifecycleConfig().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 (hasEndpointConfig()) { - hash = (37 * hash) + ENDPOINT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getEndpointConfig().hashCode(); - } - if (hasSecurityConfig()) { - hash = (37 * hash) + SECURITY_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getSecurityConfig().hashCode(); - } - if (hasGkeClusterConfig()) { - hash = (37 * hash) + GKE_CLUSTER_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getGkeClusterConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.ClusterConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterConfig) - com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterConfig.class, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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_ = ""; - - 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 (lifecycleConfigBuilder_ == null) { - lifecycleConfig_ = null; - } else { - lifecycleConfig_ = null; - lifecycleConfigBuilder_ = 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 (endpointConfigBuilder_ == null) { - endpointConfig_ = null; - } else { - endpointConfig_ = null; - endpointConfigBuilder_ = null; - } - if (securityConfigBuilder_ == null) { - securityConfig_ = null; - } else { - securityConfig_ = null; - securityConfigBuilder_ = null; - } - if (gkeClusterConfigBuilder_ == null) { - gkeClusterConfig_ = null; - } else { - gkeClusterConfig_ = null; - gkeClusterConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterConfig build() { - com.google.cloud.dataproc.v1beta2.ClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterConfig result = - new com.google.cloud.dataproc.v1beta2.ClusterConfig(this); - int from_bitField0_ = bitField0_; - result.configBucket_ = configBucket_; - 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 (lifecycleConfigBuilder_ == null) { - result.lifecycleConfig_ = lifecycleConfig_; - } else { - result.lifecycleConfig_ = lifecycleConfigBuilder_.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 (endpointConfigBuilder_ == null) { - result.endpointConfig_ = endpointConfig_; - } else { - result.endpointConfig_ = endpointConfigBuilder_.build(); - } - if (securityConfigBuilder_ == null) { - result.securityConfig_ = securityConfig_; - } else { - result.securityConfig_ = securityConfigBuilder_.build(); - } - if (gkeClusterConfigBuilder_ == null) { - result.gkeClusterConfig_ = gkeClusterConfig_; - } else { - result.gkeClusterConfig_ = gkeClusterConfigBuilder_.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.v1beta2.ClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance()) - return this; - if (!other.getConfigBucket().isEmpty()) { - configBucket_ = other.configBucket_; - 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 (other.hasLifecycleConfig()) { - mergeLifecycleConfig(other.getLifecycleConfig()); - } - 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.hasEndpointConfig()) { - mergeEndpointConfig(other.getEndpointConfig()); - } - if (other.hasSecurityConfig()) { - mergeSecurityConfig(other.getSecurityConfig()); - } - if (other.hasGkeClusterConfig()) { - mergeGkeClusterConfig(other.getGkeClusterConfig()); - } - 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.v1beta2.ClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-     * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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 com.google.cloud.dataproc.v1beta2.GceClusterConfig gceClusterConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GceClusterConfig, - com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder> - gceClusterConfigBuilder_; - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gceClusterConfig. - */ - public com.google.cloud.dataproc.v1beta2.GceClusterConfig getGceClusterConfig() { - if (gceClusterConfigBuilder_ == null) { - return gceClusterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.GceClusterConfig.getDefaultInstance() - : gceClusterConfig_; - } else { - return gceClusterConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGceClusterConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGceClusterConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGceClusterConfig(com.google.cloud.dataproc.v1beta2.GceClusterConfig value) { - if (gceClusterConfigBuilder_ == null) { - if (gceClusterConfig_ != null) { - gceClusterConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder getGceClusterConfigBuilder() { - - onChanged(); - return getGceClusterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder - getGceClusterConfigOrBuilder() { - if (gceClusterConfigBuilder_ != null) { - return gceClusterConfigBuilder_.getMessageOrBuilder(); - } else { - return gceClusterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.GceClusterConfig.getDefaultInstance() - : gceClusterConfig_; - } - } - /** - * - * - *
-     * Optional. The shared Compute Engine config settings for
-     * all instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GceClusterConfig, - com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder> - getGceClusterConfigFieldBuilder() { - if (gceClusterConfigBuilder_ == null) { - gceClusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GceClusterConfig, - com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder>( - getGceClusterConfig(), getParentForChildren(), isClean()); - gceClusterConfig_ = null; - } - return gceClusterConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.InstanceGroupConfig masterConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder> - masterConfigBuilder_; - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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 master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The masterConfig. - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getMasterConfig() { - if (masterConfigBuilder_ == null) { - return masterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : masterConfig_; - } else { - return masterConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMasterConfig(com.google.cloud.dataproc.v1beta2.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 master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setMasterConfig( - com.google.cloud.dataproc.v1beta2.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 master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeMasterConfig(com.google.cloud.dataproc.v1beta2.InstanceGroupConfig value) { - if (masterConfigBuilder_ == null) { - if (masterConfig_ != null) { - masterConfig_ = - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.newBuilder(masterConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - masterConfig_ = value; - } - onChanged(); - } else { - masterConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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 master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder getMasterConfigBuilder() { - - onChanged(); - return getMasterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder - getMasterConfigOrBuilder() { - if (masterConfigBuilder_ != null) { - return masterConfigBuilder_.getMessageOrBuilder(); - } else { - return masterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : masterConfig_; - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * the master instance in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder> - getMasterConfigFieldBuilder() { - if (masterConfigBuilder_ == null) { - masterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder>( - getMasterConfig(), getParentForChildren(), isClean()); - masterConfig_ = null; - } - return masterConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.InstanceGroupConfig workerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder> - workerConfigBuilder_; - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The workerConfig. - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getWorkerConfig() { - if (workerConfigBuilder_ == null) { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : workerConfig_; - } else { - return workerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setWorkerConfig(com.google.cloud.dataproc.v1beta2.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
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setWorkerConfig( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder builderForValue) { - if (workerConfigBuilder_ == null) { - workerConfig_ = builderForValue.build(); - onChanged(); - } else { - workerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeWorkerConfig(com.google.cloud.dataproc.v1beta2.InstanceGroupConfig value) { - if (workerConfigBuilder_ == null) { - if (workerConfig_ != null) { - workerConfig_ = - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.newBuilder(workerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - workerConfig_ = value; - } - onChanged(); - } else { - workerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder getWorkerConfigBuilder() { - - onChanged(); - return getWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder - getWorkerConfigOrBuilder() { - if (workerConfigBuilder_ != null) { - return workerConfigBuilder_.getMessageOrBuilder(); - } else { - return workerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : workerConfig_; - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder> - getWorkerConfigFieldBuilder() { - if (workerConfigBuilder_ == null) { - workerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder>( - getWorkerConfig(), getParentForChildren(), isClean()); - workerConfig_ = null; - } - return workerConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.InstanceGroupConfig secondaryWorkerConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder> - secondaryWorkerConfigBuilder_; - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getSecondaryWorkerConfig() { - if (secondaryWorkerConfigBuilder_ == null) { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } else { - return secondaryWorkerConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1beta2.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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecondaryWorkerConfig( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder builderForValue) { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfig_ = builderForValue.build(); - onChanged(); - } else { - secondaryWorkerConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSecondaryWorkerConfig( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig value) { - if (secondaryWorkerConfigBuilder_ == null) { - if (secondaryWorkerConfig_ != null) { - secondaryWorkerConfig_ = - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.newBuilder( - secondaryWorkerConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - secondaryWorkerConfig_ = value; - } - onChanged(); - } else { - secondaryWorkerConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder - getSecondaryWorkerConfigBuilder() { - - onChanged(); - return getSecondaryWorkerConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder - getSecondaryWorkerConfigOrBuilder() { - if (secondaryWorkerConfigBuilder_ != null) { - return secondaryWorkerConfigBuilder_.getMessageOrBuilder(); - } else { - return secondaryWorkerConfig_ == null - ? com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance() - : secondaryWorkerConfig_; - } - } - /** - * - * - *
-     * Optional. The Compute Engine config settings for
-     * additional worker instances in a cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder> - getSecondaryWorkerConfigFieldBuilder() { - if (secondaryWorkerConfigBuilder_ == null) { - secondaryWorkerConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder>( - getSecondaryWorkerConfig(), getParentForChildren(), isClean()); - secondaryWorkerConfig_ = null; - } - return secondaryWorkerConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.SoftwareConfig softwareConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SoftwareConfig, - com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder, - com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder> - softwareConfigBuilder_; - /** - * - * - *
-     * Optional. The config settings for software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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 software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The softwareConfig. - */ - public com.google.cloud.dataproc.v1beta2.SoftwareConfig getSoftwareConfig() { - if (softwareConfigBuilder_ == null) { - return softwareConfig_ == null - ? com.google.cloud.dataproc.v1beta2.SoftwareConfig.getDefaultInstance() - : softwareConfig_; - } else { - return softwareConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The config settings for software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSoftwareConfig(com.google.cloud.dataproc.v1beta2.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 software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSoftwareConfig( - com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder builderForValue) { - if (softwareConfigBuilder_ == null) { - softwareConfig_ = builderForValue.build(); - onChanged(); - } else { - softwareConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The config settings for software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSoftwareConfig(com.google.cloud.dataproc.v1beta2.SoftwareConfig value) { - if (softwareConfigBuilder_ == null) { - if (softwareConfig_ != null) { - softwareConfig_ = - com.google.cloud.dataproc.v1beta2.SoftwareConfig.newBuilder(softwareConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - softwareConfig_ = value; - } - onChanged(); - } else { - softwareConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The config settings for software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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 software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder getSoftwareConfigBuilder() { - - onChanged(); - return getSoftwareConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The config settings for software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder getSoftwareConfigOrBuilder() { - if (softwareConfigBuilder_ != null) { - return softwareConfigBuilder_.getMessageOrBuilder(); - } else { - return softwareConfig_ == null - ? com.google.cloud.dataproc.v1beta2.SoftwareConfig.getDefaultInstance() - : softwareConfig_; - } - } - /** - * - * - *
-     * Optional. The config settings for software inside the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SoftwareConfig, - com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder, - com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder> - getSoftwareConfigFieldBuilder() { - if (softwareConfigBuilder_ == null) { - softwareConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SoftwareConfig, - com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder, - com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder>( - getSoftwareConfig(), getParentForChildren(), isClean()); - softwareConfig_ = null; - } - return softwareConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.LifecycleConfig lifecycleConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LifecycleConfig, - com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder, - com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder> - lifecycleConfigBuilder_; - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the lifecycleConfig field is set. - */ - public boolean hasLifecycleConfig() { - return lifecycleConfigBuilder_ != null || lifecycleConfig_ != null; - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The lifecycleConfig. - */ - public com.google.cloud.dataproc.v1beta2.LifecycleConfig getLifecycleConfig() { - if (lifecycleConfigBuilder_ == null) { - return lifecycleConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LifecycleConfig.getDefaultInstance() - : lifecycleConfig_; - } else { - return lifecycleConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLifecycleConfig(com.google.cloud.dataproc.v1beta2.LifecycleConfig value) { - if (lifecycleConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - lifecycleConfig_ = value; - onChanged(); - } else { - lifecycleConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLifecycleConfig( - com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder builderForValue) { - if (lifecycleConfigBuilder_ == null) { - lifecycleConfig_ = builderForValue.build(); - onChanged(); - } else { - lifecycleConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLifecycleConfig(com.google.cloud.dataproc.v1beta2.LifecycleConfig value) { - if (lifecycleConfigBuilder_ == null) { - if (lifecycleConfig_ != null) { - lifecycleConfig_ = - com.google.cloud.dataproc.v1beta2.LifecycleConfig.newBuilder(lifecycleConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - lifecycleConfig_ = value; - } - onChanged(); - } else { - lifecycleConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearLifecycleConfig() { - if (lifecycleConfigBuilder_ == null) { - lifecycleConfig_ = null; - onChanged(); - } else { - lifecycleConfig_ = null; - lifecycleConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder getLifecycleConfigBuilder() { - - onChanged(); - return getLifecycleConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder - getLifecycleConfigOrBuilder() { - if (lifecycleConfigBuilder_ != null) { - return lifecycleConfigBuilder_.getMessageOrBuilder(); - } else { - return lifecycleConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LifecycleConfig.getDefaultInstance() - : lifecycleConfig_; - } - } - /** - * - * - *
-     * Optional. The config setting for auto delete cluster schedule.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LifecycleConfig, - com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder, - com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder> - getLifecycleConfigFieldBuilder() { - if (lifecycleConfigBuilder_ == null) { - lifecycleConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LifecycleConfig, - com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder, - com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder>( - getLifecycleConfig(), getParentForChildren(), isClean()); - lifecycleConfig_ = null; - } - return lifecycleConfigBuilder_; - } - - 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.v1beta2.NodeInitializationAction, - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.Builder, - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInitializationActions( - int index, com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setInitializationActions( - int index, - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - int index, com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addInitializationActions( - int index, - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder> - 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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.NodeInitializationAction.Builder - addInitializationActionsBuilder() { - return getInitializationActionsFieldBuilder() - .addBuilder( - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.NodeInitializationAction.Builder - addInitializationActionsBuilder(int index) { - return getInitializationActionsFieldBuilder() - .addBuilder( - index, - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-     *     if [[ "${ROLE}" == 'Master' ]]; then
-     *       ... master specific actions ...
-     *     else
-     *       ... worker specific actions ...
-     *     fi
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction, - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.Builder, - com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder> - getInitializationActionsFieldBuilder() { - if (initializationActionsBuilder_ == null) { - initializationActionsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.NodeInitializationAction, - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.Builder, - com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder>( - initializationActions_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - initializationActions_ = null; - } - return initializationActionsBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.EncryptionConfig encryptionConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.EncryptionConfig, - com.google.cloud.dataproc.v1beta2.EncryptionConfig.Builder, - com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder> - encryptionConfigBuilder_; - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionConfig. - */ - public com.google.cloud.dataproc.v1beta2.EncryptionConfig getEncryptionConfig() { - if (encryptionConfigBuilder_ == null) { - return encryptionConfig_ == null - ? com.google.cloud.dataproc.v1beta2.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } else { - return encryptionConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEncryptionConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEncryptionConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEncryptionConfig(com.google.cloud.dataproc.v1beta2.EncryptionConfig value) { - if (encryptionConfigBuilder_ == null) { - if (encryptionConfig_ != null) { - encryptionConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.EncryptionConfig.Builder getEncryptionConfigBuilder() { - - onChanged(); - return getEncryptionConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder - getEncryptionConfigOrBuilder() { - if (encryptionConfigBuilder_ != null) { - return encryptionConfigBuilder_.getMessageOrBuilder(); - } else { - return encryptionConfig_ == null - ? com.google.cloud.dataproc.v1beta2.EncryptionConfig.getDefaultInstance() - : encryptionConfig_; - } - } - /** - * - * - *
-     * Optional. Encryption settings for the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.EncryptionConfig, - com.google.cloud.dataproc.v1beta2.EncryptionConfig.Builder, - com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder> - getEncryptionConfigFieldBuilder() { - if (encryptionConfigBuilder_ == null) { - encryptionConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.EncryptionConfig, - com.google.cloud.dataproc.v1beta2.EncryptionConfig.Builder, - com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder>( - getEncryptionConfig(), getParentForChildren(), isClean()); - encryptionConfig_ = null; - } - return encryptionConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.AutoscalingConfig autoscalingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingConfig, - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder> - autoscalingConfigBuilder_; - /** - * - * - *
-     * Optional. Autoscaling config for the policy associated with the cluster.
-     * Cluster does not autoscale if this field is unset.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscalingConfig. - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingConfig getAutoscalingConfig() { - if (autoscalingConfigBuilder_ == null) { - return autoscalingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoscalingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAutoscalingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeAutoscalingConfig( - com.google.cloud.dataproc.v1beta2.AutoscalingConfig value) { - if (autoscalingConfigBuilder_ == null) { - if (autoscalingConfig_ != null) { - autoscalingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder - getAutoscalingConfigOrBuilder() { - if (autoscalingConfigBuilder_ != null) { - return autoscalingConfigBuilder_.getMessageOrBuilder(); - } else { - return autoscalingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingConfig, - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder> - getAutoscalingConfigFieldBuilder() { - if (autoscalingConfigBuilder_ == null) { - autoscalingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingConfig, - com.google.cloud.dataproc.v1beta2.AutoscalingConfig.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder>( - getAutoscalingConfig(), getParentForChildren(), isClean()); - autoscalingConfig_ = null; - } - return autoscalingConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.EndpointConfig endpointConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.EndpointConfig, - com.google.cloud.dataproc.v1beta2.EndpointConfig.Builder, - com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder> - endpointConfigBuilder_; - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.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.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endpointConfig. - */ - public com.google.cloud.dataproc.v1beta2.EndpointConfig getEndpointConfig() { - if (endpointConfigBuilder_ == null) { - return endpointConfig_ == null - ? com.google.cloud.dataproc.v1beta2.EndpointConfig.getDefaultInstance() - : endpointConfig_; - } else { - return endpointConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndpointConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setEndpointConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeEndpointConfig(com.google.cloud.dataproc.v1beta2.EndpointConfig value) { - if (endpointConfigBuilder_ == null) { - if (endpointConfig_ != null) { - endpointConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig endpoint_config = 17 [(.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.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.EndpointConfig.Builder getEndpointConfigBuilder() { - - onChanged(); - return getEndpointConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder getEndpointConfigOrBuilder() { - if (endpointConfigBuilder_ != null) { - return endpointConfigBuilder_.getMessageOrBuilder(); - } else { - return endpointConfig_ == null - ? com.google.cloud.dataproc.v1beta2.EndpointConfig.getDefaultInstance() - : endpointConfig_; - } - } - /** - * - * - *
-     * Optional. Port/endpoint configuration for this cluster
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.EndpointConfig, - com.google.cloud.dataproc.v1beta2.EndpointConfig.Builder, - com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder> - getEndpointConfigFieldBuilder() { - if (endpointConfigBuilder_ == null) { - endpointConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.EndpointConfig, - com.google.cloud.dataproc.v1beta2.EndpointConfig.Builder, - com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder>( - getEndpointConfig(), getParentForChildren(), isClean()); - endpointConfig_ = null; - } - return endpointConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.SecurityConfig securityConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SecurityConfig, - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder, - com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder> - securityConfigBuilder_; - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the securityConfig field is set. - */ - public boolean hasSecurityConfig() { - return securityConfigBuilder_ != null || securityConfig_ != null; - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The securityConfig. - */ - public com.google.cloud.dataproc.v1beta2.SecurityConfig getSecurityConfig() { - if (securityConfigBuilder_ == null) { - return securityConfig_ == null - ? com.google.cloud.dataproc.v1beta2.SecurityConfig.getDefaultInstance() - : securityConfig_; - } else { - return securityConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecurityConfig(com.google.cloud.dataproc.v1beta2.SecurityConfig value) { - if (securityConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - securityConfig_ = value; - onChanged(); - } else { - securityConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSecurityConfig( - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder builderForValue) { - if (securityConfigBuilder_ == null) { - securityConfig_ = builderForValue.build(); - onChanged(); - } else { - securityConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSecurityConfig(com.google.cloud.dataproc.v1beta2.SecurityConfig value) { - if (securityConfigBuilder_ == null) { - if (securityConfig_ != null) { - securityConfig_ = - com.google.cloud.dataproc.v1beta2.SecurityConfig.newBuilder(securityConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - securityConfig_ = value; - } - onChanged(); - } else { - securityConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearSecurityConfig() { - if (securityConfigBuilder_ == null) { - securityConfig_ = null; - onChanged(); - } else { - securityConfig_ = null; - securityConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder getSecurityConfigBuilder() { - - onChanged(); - return getSecurityConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder getSecurityConfigOrBuilder() { - if (securityConfigBuilder_ != null) { - return securityConfigBuilder_.getMessageOrBuilder(); - } else { - return securityConfig_ == null - ? com.google.cloud.dataproc.v1beta2.SecurityConfig.getDefaultInstance() - : securityConfig_; - } - } - /** - * - * - *
-     * Optional. Security related configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SecurityConfig, - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder, - com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder> - getSecurityConfigFieldBuilder() { - if (securityConfigBuilder_ == null) { - securityConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SecurityConfig, - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder, - com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder>( - getSecurityConfig(), getParentForChildren(), isClean()); - securityConfig_ = null; - } - return securityConfigBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.GkeClusterConfig gkeClusterConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GkeClusterConfig, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder> - gkeClusterConfigBuilder_; - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gkeClusterConfig field is set. - */ - public boolean hasGkeClusterConfig() { - return gkeClusterConfigBuilder_ != null || gkeClusterConfig_ != null; - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gkeClusterConfig. - */ - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig getGkeClusterConfig() { - if (gkeClusterConfigBuilder_ == null) { - return gkeClusterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.GkeClusterConfig.getDefaultInstance() - : gkeClusterConfig_; - } else { - return gkeClusterConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGkeClusterConfig(com.google.cloud.dataproc.v1beta2.GkeClusterConfig value) { - if (gkeClusterConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gkeClusterConfig_ = value; - onChanged(); - } else { - gkeClusterConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setGkeClusterConfig( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder builderForValue) { - if (gkeClusterConfigBuilder_ == null) { - gkeClusterConfig_ = builderForValue.build(); - onChanged(); - } else { - gkeClusterConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeGkeClusterConfig(com.google.cloud.dataproc.v1beta2.GkeClusterConfig value) { - if (gkeClusterConfigBuilder_ == null) { - if (gkeClusterConfig_ != null) { - gkeClusterConfig_ = - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.newBuilder(gkeClusterConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - gkeClusterConfig_ = value; - } - onChanged(); - } else { - gkeClusterConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearGkeClusterConfig() { - if (gkeClusterConfigBuilder_ == null) { - gkeClusterConfig_ = null; - onChanged(); - } else { - gkeClusterConfig_ = null; - gkeClusterConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder getGkeClusterConfigBuilder() { - - onChanged(); - return getGkeClusterConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder - getGkeClusterConfigOrBuilder() { - if (gkeClusterConfigBuilder_ != null) { - return gkeClusterConfigBuilder_.getMessageOrBuilder(); - } else { - return gkeClusterConfig_ == null - ? com.google.cloud.dataproc.v1beta2.GkeClusterConfig.getDefaultInstance() - : gkeClusterConfig_; - } - } - /** - * - * - *
-     * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-     * Setting this is considered mutually exclusive with Compute Engine-based
-     * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-     * `secondary_worker_config`, and `autoscaling_config`.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GkeClusterConfig, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder> - getGkeClusterConfigFieldBuilder() { - if (gkeClusterConfigBuilder_ == null) { - gkeClusterConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GkeClusterConfig, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder>( - getGkeClusterConfig(), getParentForChildren(), isClean()); - gkeClusterConfig_ = null; - } - return gkeClusterConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.ClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterConfig) - private static final com.google.cloud.dataproc.v1beta2.ClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfigOrBuilder.java deleted file mode 100644 index cd74b235..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterConfigOrBuilder.java +++ /dev/null @@ -1,661 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-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
-   * bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
-   * 
- * - * string config_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for configBucket. - */ - com.google.protobuf.ByteString getConfigBucketBytes(); - - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gceClusterConfig. - */ - com.google.cloud.dataproc.v1beta2.GceClusterConfig getGceClusterConfig(); - /** - * - * - *
-   * Optional. The shared Compute Engine config settings for
-   * all instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GceClusterConfig gce_cluster_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder getGceClusterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the master instance in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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 master instance in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The masterConfig. - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getMasterConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * the master instance in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig master_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder getMasterConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-   * worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The workerConfig. - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getWorkerConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig worker_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder getWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * additional worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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
-   * additional worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The secondaryWorkerConfig. - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getSecondaryWorkerConfig(); - /** - * - * - *
-   * Optional. The Compute Engine config settings for
-   * additional worker instances in a cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.InstanceGroupConfig secondary_worker_config = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder - getSecondaryWorkerConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The config settings for software inside the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the softwareConfig field is set. - */ - boolean hasSoftwareConfig(); - /** - * - * - *
-   * Optional. The config settings for software inside the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The softwareConfig. - */ - com.google.cloud.dataproc.v1beta2.SoftwareConfig getSoftwareConfig(); - /** - * - * - *
-   * Optional. The config settings for software inside the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SoftwareConfig software_config = 13 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder getSoftwareConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The config setting for auto delete cluster schedule.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the lifecycleConfig field is set. - */ - boolean hasLifecycleConfig(); - /** - * - * - *
-   * Optional. The config setting for auto delete cluster schedule.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The lifecycleConfig. - */ - com.google.cloud.dataproc.v1beta2.LifecycleConfig getLifecycleConfig(); - /** - * - * - *
-   * Optional. The config setting for auto delete cluster schedule.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LifecycleConfig lifecycle_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder getLifecycleConfigOrBuilder(); - - /** - * - * - *
-   * 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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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 <code>role</code> 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/v1beta2/instance/attributes/dataproc-role)
-   *     if [[ "${ROLE}" == 'Master' ]]; then
-   *       ... master specific actions ...
-   *     else
-   *       ... worker specific actions ...
-   *     fi
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.NodeInitializationAction initialization_actions = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder - getInitializationActionsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The encryptionConfig. - */ - com.google.cloud.dataproc.v1beta2.EncryptionConfig getEncryptionConfig(); - /** - * - * - *
-   * Optional. Encryption settings for the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EncryptionConfig encryption_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder getEncryptionConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.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.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The autoscalingConfig. - */ - com.google.cloud.dataproc.v1beta2.AutoscalingConfig getAutoscalingConfig(); - /** - * - * - *
-   * Optional. Autoscaling config for the policy associated with the cluster.
-   * Cluster does not autoscale if this field is unset.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingConfig autoscaling_config = 16 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.AutoscalingConfigOrBuilder getAutoscalingConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the endpointConfig field is set. - */ - boolean hasEndpointConfig(); - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The endpointConfig. - */ - com.google.cloud.dataproc.v1beta2.EndpointConfig getEndpointConfig(); - /** - * - * - *
-   * Optional. Port/endpoint configuration for this cluster
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.EndpointConfig endpoint_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder getEndpointConfigOrBuilder(); - - /** - * - * - *
-   * Optional. Security related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the securityConfig field is set. - */ - boolean hasSecurityConfig(); - /** - * - * - *
-   * Optional. Security related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The securityConfig. - */ - com.google.cloud.dataproc.v1beta2.SecurityConfig getSecurityConfig(); - /** - * - * - *
-   * Optional. Security related configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SecurityConfig security_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder getSecurityConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-   * Setting this is considered mutually exclusive with Compute Engine-based
-   * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-   * `secondary_worker_config`, and `autoscaling_config`.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the gkeClusterConfig field is set. - */ - boolean hasGkeClusterConfig(); - /** - * - * - *
-   * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-   * Setting this is considered mutually exclusive with Compute Engine-based
-   * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-   * `secondary_worker_config`, and `autoscaling_config`.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The gkeClusterConfig. - */ - com.google.cloud.dataproc.v1beta2.GkeClusterConfig getGkeClusterConfig(); - /** - * - * - *
-   * Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes.
-   * Setting this is considered mutually exclusive with Compute Engine-based
-   * options such as `gce_cluster_config`, `master_config`, `worker_config`,
-   * `secondary_worker_config`, and `autoscaling_config`.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig gke_cluster_config = 19 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder getGkeClusterConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetrics.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetrics.java deleted file mode 100644 index 6dac9a09..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetrics.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.ClusterMetrics} - */ -public final class ClusterMetrics extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterMetrics.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClusterMetrics)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterMetrics other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterMetrics} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterMetrics) - com.google.cloud.dataproc.v1beta2.ClusterMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterMetrics.class, - com.google.cloud.dataproc.v1beta2.ClusterMetrics.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterMetrics getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterMetrics.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterMetrics build() { - com.google.cloud.dataproc.v1beta2.ClusterMetrics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterMetrics buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterMetrics result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterMetrics other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterMetrics) - private static final com.google.cloud.dataproc.v1beta2.ClusterMetrics DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterMetrics(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetricsOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterMetricsOrBuilder.java deleted file mode 100644 index 61fd070b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperation.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperation.java deleted file mode 100644 index 921753bf..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperation.java +++ /dev/null @@ -1,905 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The cluster operation triggered by a workflow.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ClusterOperation} - */ -public final class ClusterOperation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterOperation.class, - com.google.cloud.dataproc.v1beta2.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 (!getOperationIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operationId_); - } - if (!getErrorBytes().isEmpty()) { - 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 (!getOperationIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operationId_); - } - if (!getErrorBytes().isEmpty()) { - 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.v1beta2.ClusterOperation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterOperation other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterOperation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterOperation) - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterOperation.class, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperation build() { - com.google.cloud.dataproc.v1beta2.ClusterOperation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperation buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterOperation result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterOperation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterOperation other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterOperation) - private static final com.google.cloud.dataproc.v1beta2.ClusterOperation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterOperation(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadata.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadata.java deleted file mode 100644 index d8746ae7..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadata.java +++ /dev/null @@ -1,2589 +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/v1beta2/operations.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Metadata describing the operation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ClusterOperationMetadata} - */ -public final class ClusterOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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< - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus>(); - mutable_bitField0_ |= 0x00000001; - } - statusHistory_.add( - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ClusterOperationStatus status_; - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - * - * @return Whether the status field is set. - */ - @java.lang.Override - public boolean hasStatus() { - return status_ != null; - } - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus getStatus() { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.getDefaultInstance() - : status_; - } - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - @java.lang.Override - public java.util.List - getStatusHistoryList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - @java.lang.Override - public java.util.List - getStatusHistoryOrBuilderList() { - return statusHistory_; - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - @java.lang.Override - public int getStatusHistoryCount() { - return statusHistory_.size(); - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus getStatusHistory(int index) { - return statusHistory_.get(index); - } - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_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; - */ - @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; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13; - */ - @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; - */ - @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; - * - * @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; - * - * @return The count of warnings. - */ - public int getWarningsCount() { - return warnings_.size(); - } - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14; - * - * @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; - * - * @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 (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - 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 (!getOperationTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, operationType_); - } - if (!getDescriptionBytes().isEmpty()) { - 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 (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - 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 (!getOperationTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, operationType_); - } - if (!getDescriptionBytes().isEmpty()) { - 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.v1beta2.ClusterOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterOperationMetadata) - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata.class, - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata build() { - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ClusterOperationStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - * - * @return The status. - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - public Builder setStatus(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status = 9; - */ - public Builder setStatus( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status = 9; - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1beta2.ClusterOperationStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.newBuilder(status_) - .mergeFrom(value) - .buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. Current operation status.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder> - statusHistoryBuilder_; - - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - 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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public int getStatusHistoryCount() { - if (statusHistoryBuilder_ == null) { - return statusHistory_.size(); - } else { - return statusHistoryBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public Builder setStatusHistory( - int index, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public Builder addStatusHistory( - int index, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - 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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - 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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - 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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder getStatusHistoryBuilder( - int index) { - return getStatusHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public java.util.List< - ? extends com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder> - getStatusHistoryOrBuilderList() { - if (statusHistoryBuilder_ != null) { - return statusHistoryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statusHistory_); - } - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder - addStatusHistoryBuilder() { - return getStatusHistoryFieldBuilder() - .addBuilder( - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder addStatusHistoryBuilder( - int index) { - return getStatusHistoryFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous operation status.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - public java.util.List - getStatusHistoryBuilderList() { - return getStatusHistoryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder> - getStatusHistoryFieldBuilder() { - if (statusHistoryBuilder_ == null) { - statusHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @return This builder for chaining. - */ - public Builder clearOperationType() { - - operationType_ = getDefaultInstance().getOperationType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The operation type.
-     * 
- * - * string operation_type = 11; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Short description of operation.
-     * 
- * - * string description = 12; - * - * @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; - */ - @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; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Output only. Labels associated with the operation
-     * 
- * - * map<string, string> labels = 13; - */ - @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; - */ - @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; - */ - 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; - */ - 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; - */ - 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; - * - * @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; - * - * @return The count of warnings. - */ - public int getWarningsCount() { - return warnings_.size(); - } - /** - * - * - *
-     * Output only. Errors encountered during operation execution.
-     * 
- * - * repeated string warnings = 14; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ClusterOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterOperationMetadata) - private static final com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterOperationMetadata(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadataOrBuilder.java deleted file mode 100644 index 1be49556..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationMetadataOrBuilder.java +++ /dev/null @@ -1,323 +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/v1beta2/operations.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ClusterOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Name of the cluster for the operation.
-   * 
- * - * string cluster_name = 7; - * - * @return The clusterName. - */ - java.lang.String getClusterName(); - /** - * - * - *
-   * Output only. Name of the cluster for the operation.
-   * 
- * - * string cluster_name = 7; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Output only. Cluster UUID for the operation.
-   * 
- * - * string cluster_uuid = 8; - * - * @return The clusterUuid. - */ - java.lang.String getClusterUuid(); - /** - * - * - *
-   * Output only. Cluster UUID for the operation.
-   * 
- * - * string cluster_uuid = 8; - * - * @return The bytes for clusterUuid. - */ - com.google.protobuf.ByteString getClusterUuidBytes(); - - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - * - * @return Whether the status field is set. - */ - boolean hasStatus(); - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - * - * @return The status. - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus getStatus(); - /** - * - * - *
-   * Output only. Current operation status.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus status = 9; - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - java.util.List getStatusHistoryList(); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus getStatusHistory(int index); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - int getStatusHistoryCount(); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - java.util.List - getStatusHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. The previous operation status.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.ClusterOperationStatus status_history = 10; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder getStatusHistoryOrBuilder( - int index); - - /** - * - * - *
-   * Output only. The operation type.
-   * 
- * - * string operation_type = 11; - * - * @return The operationType. - */ - java.lang.String getOperationType(); - /** - * - * - *
-   * Output only. The operation type.
-   * 
- * - * string operation_type = 11; - * - * @return The bytes for operationType. - */ - com.google.protobuf.ByteString getOperationTypeBytes(); - - /** - * - * - *
-   * Output only. Short description of operation.
-   * 
- * - * string description = 12; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Output only. Short description of operation.
-   * 
- * - * string description = 12; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13; - */ - int getLabelsCount(); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13; - */ - 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; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13; - */ - java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Output only. Labels associated with the operation
-   * 
- * - * map<string, string> labels = 13; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14; - * - * @return A list containing the warnings. - */ - java.util.List getWarningsList(); - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14; - * - * @return The count of warnings. - */ - int getWarningsCount(); - /** - * - * - *
-   * Output only. Errors encountered during operation execution.
-   * 
- * - * repeated string warnings = 14; - * - * @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; - * - * @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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationOrBuilder.java deleted file mode 100644 index 89f8858a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterOperationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatus.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatus.java deleted file mode 100644 index f184c029..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatus.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/v1beta2/operations.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The status of the operation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ClusterOperationStatus} - */ -public final class ClusterOperationStatus extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.class, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder.class); - } - - /** - * - * - *
-   * The operation state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterOperationStatus.State) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus.State state = 1; - * - * @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.v1beta2.ClusterOperationStatus.State state = 1; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State result = - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - */ - @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.v1beta2.ClusterOperationStatus.State.UNKNOWN.getNumber()) { - output.writeEnum(1, state_); - } - if (!getInnerStateBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, innerState_); - } - if (!getDetailsBytes().isEmpty()) { - 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.v1beta2.ClusterOperationStatus.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!getInnerStateBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, innerState_); - } - if (!getDetailsBytes().isEmpty()) { - 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.v1beta2.ClusterOperationStatus)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterOperationStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterOperationStatus) - com.google.cloud.dataproc.v1beta2.ClusterOperationStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.class, - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.OperationsProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus build() { - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterOperationStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterOperationStatus other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus.State state = 1; - * - * @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.v1beta2.ClusterOperationStatus.State state = 1; - * - * @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.v1beta2.ClusterOperationStatus.State state = 1; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State result = - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. A message containing the operation state.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus.State state = 1; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus.State state = 1; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - 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.v1beta2.ClusterOperationStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterOperationStatus) - private static final com.google.cloud.dataproc.v1beta2.ClusterOperationStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterOperationStatus(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperationStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatusOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatusOrBuilder.java deleted file mode 100644 index 30387950..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOperationStatusOrBuilder.java +++ /dev/null @@ -1,135 +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/v1beta2/operations.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterOperationStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ClusterOperationStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus.State state = 1; - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. A message containing the operation state.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterOperationStatus.State state = 1; - * - * @return The state. - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationStatus.State getState(); - - /** - * - * - *
-   * Output only. A message containing the detailed operation state.
-   * 
- * - * string inner_state = 2; - * - * @return The innerState. - */ - java.lang.String getInnerState(); - /** - * - * - *
-   * Output only. A message containing the detailed operation state.
-   * 
- * - * string inner_state = 2; - * - * @return The bytes for innerState. - */ - com.google.protobuf.ByteString getInnerStateBytes(); - - /** - * - * - *
-   * Output only. A message containing any operation metadata details.
-   * 
- * - * string details = 3; - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Output only. A message containing any operation metadata details.
-   * 
- * - * string details = 3; - * - * @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; - * - * @return Whether the stateStartTime field is set. - */ - boolean hasStateStartTime(); - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * .google.protobuf.Timestamp state_start_time = 4; - * - * @return The stateStartTime. - */ - com.google.protobuf.Timestamp getStateStartTime(); - /** - * - * - *
-   * Output only. The time this state was entered.
-   * 
- * - * .google.protobuf.Timestamp state_start_time = 4; - */ - com.google.protobuf.TimestampOrBuilder getStateStartTimeOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOrBuilder.java deleted file mode 100644 index 6a4f0aa2..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterOrBuilder.java +++ /dev/null @@ -1,382 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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(); - - /** - * - * - *
-   * Required. The cluster config. Note that Dataproc may set
-   * default values, and values may change when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - * - * - *
-   * Required. The cluster config. Note that Dataproc may set
-   * default values, and values may change when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The config. - */ - com.google.cloud.dataproc.v1beta2.ClusterConfig getConfig(); - /** - * - * - *
-   * Required. The cluster config. Note that Dataproc may set
-   * default values, and values may change when clusters are updated.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder getConfigOrBuilder(); - - /** - * - * - *
-   * 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.v1beta2.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.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1beta2.ClusterStatus getStatus(); - /** - * - * - *
-   * Output only. Cluster status.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterStatus status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getStatusHistoryList(); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterStatus getStatusHistory(int index); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getStatusHistoryCount(); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getStatusHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. The previous cluster status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.ClusterStatus status_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The metrics. - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterMetrics metrics = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterMetricsOrBuilder getMetricsOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelector.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelector.java deleted file mode 100644 index 64d59998..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelector.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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A selector that chooses target cluster for jobs based on metadata.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ClusterSelector} - */ -public final class ClusterSelector extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterSelector.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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; - */ - @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; - */ - @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; - */ - @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; - */ - @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 (!getZoneBytes().isEmpty()) { - 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 (!getZoneBytes().isEmpty()) { - 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.v1beta2.ClusterSelector)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterSelector other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterSelector} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterSelector) - com.google.cloud.dataproc.v1beta2.ClusterSelectorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterSelector.class, - com.google.cloud.dataproc.v1beta2.ClusterSelector.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelector getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterSelector.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelector build() { - com.google.cloud.dataproc.v1beta2.ClusterSelector result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelector buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterSelector result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterSelector) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterSelector other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - */ - @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; - */ - @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; - */ - @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; - */ - @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; - */ - 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; - */ - 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; - */ - 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.v1beta2.ClusterSelector) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterSelector) - private static final com.google.cloud.dataproc.v1beta2.ClusterSelector DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterSelector(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelectorOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelectorOrBuilder.java deleted file mode 100644 index eabce738..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterSelectorOrBuilder.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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterSelectorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - */ - int getClusterLabelsCount(); - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2; - */ - 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; - */ - java.util.Map getClusterLabelsMap(); - /** - * - * - *
-   * Required. The cluster labels. Cluster must have all labels
-   * to match.
-   * 
- * - * map<string, string> cluster_labels = 2; - */ - 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; - */ - java.lang.String getClusterLabelsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatus.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatus.java deleted file mode 100644 index 83c4be4b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatus.java +++ /dev/null @@ -1,1748 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The status of a cluster and its instances.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ClusterStatus} - */ -public final class ClusterStatus extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterStatus.class, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder.class); - } - - /** - * - * - *
-   * The cluster state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.
-     * 
- * - * RUNNING = 2; - */ - RUNNING(2), - /** - * - * - *
-     * The cluster encountered an error. It is not ready for use.
-     * 
- * - * ERROR = 3; - */ - ERROR(3), - /** - * - * - *
-     * 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.
-     * 
- * - * 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 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 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.v1beta2.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.v1beta2.ClusterStatus.State) - } - - /** - * - * - *
-   * The cluster substate.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus.Substate) - } - - public static final int STATE_FIELD_NUMBER = 1; - private int state_; - /** - * - * - *
-   * Output only. The cluster's state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ClusterStatus.State result = - com.google.cloud.dataproc.v1beta2.ClusterStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.ClusterStatus.State.UNRECOGNIZED - : result; - } - - public static final int DETAIL_FIELD_NUMBER = 2; - private volatile java.lang.Object detail_; - /** - * - * - *
-   * Output only. Optional details of cluster's state.
-   * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-   * Output only. Optional details of cluster's state.
-   * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.v1beta2.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.v1beta2.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate result = - com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate.valueOf(substate_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus.State.UNKNOWN.getNumber()) { - output.writeEnum(1, state_); - } - if (!getDetailBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_); - } - if (stateStartTime_ != null) { - output.writeMessage(3, getStateStartTime()); - } - if (substate_ - != com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!getDetailBytes().isEmpty()) { - 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.v1beta2.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.v1beta2.ClusterStatus)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ClusterStatus other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ClusterStatus) - com.google.cloud.dataproc.v1beta2.ClusterStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ClusterStatus.class, - com.google.cloud.dataproc.v1beta2.ClusterStatus.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ClusterStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus build() { - com.google.cloud.dataproc.v1beta2.ClusterStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus buildPartial() { - com.google.cloud.dataproc.v1beta2.ClusterStatus result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ClusterStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ClusterStatus other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ClusterStatus.State result = - com.google.cloud.dataproc.v1beta2.ClusterStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.ClusterStatus.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The cluster's state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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_ = ""; - /** - * - * - *
-     * Output only. Optional details of cluster's state.
-     * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. Optional details of cluster's state.
-     * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. Optional details of cluster's state.
-     * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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; - } - /** - * - * - *
-     * Output only. Optional details of cluster's state.
-     * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDetail() { - - detail_ = getDefaultInstance().getDetail(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Optional details of cluster's state.
-     * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate result = - com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate.valueOf(substate_); - return result == null - ? com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. Additional state information that includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ClusterStatus) - private static final com.google.cloud.dataproc.v1beta2.ClusterStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ClusterStatus(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatusOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatusOrBuilder.java deleted file mode 100644 index f0024925..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClusterStatusOrBuilder.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ClusterStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ClusterStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The cluster's state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1beta2.ClusterStatus.State getState(); - - /** - * - * - *
-   * Output only. Optional details of cluster's state.
-   * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The detail. - */ - java.lang.String getDetail(); - /** - * - * - *
-   * Output only. Optional details of cluster's state.
-   * 
- * - * string detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.v1beta2.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.v1beta2.ClusterStatus.Substate substate = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - com.google.cloud.dataproc.v1beta2.ClusterStatus.Substate getSubstate(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClustersProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClustersProto.java deleted file mode 100644 index 9f45a968..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ClustersProto.java +++ /dev/null @@ -1,774 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -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_v1beta2_Cluster_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_Cluster_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_Cluster_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_Cluster_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_HttpPortsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_HttpPortsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_MetadataEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_MetadataEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DiskConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_DiskConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_HdfsMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_HdfsMetricsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_YarnMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_YarnMetricsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_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/v1beta2/clusters" - + ".proto\022\035google.cloud.dataproc.v1beta2\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/v1beta2/shared.proto\032#go" - + "ogle/longrunning/operations.proto\032\036googl" - + "e/protobuf/duration.proto\032 google/protob" - + "uf/field_mask.proto\032\037google/protobuf/tim" - + "estamp.proto\"\346\003\n\007Cluster\022\027\n\nproject_id\030\001" - + " \001(\tB\003\340A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\022A\n\006" - + "config\030\003 \001(\0132,.google.cloud.dataproc.v1b" - + "eta2.ClusterConfigB\003\340A\002\022G\n\006labels\030\010 \003(\0132" - + "2.google.cloud.dataproc.v1beta2.Cluster." - + "LabelsEntryB\003\340A\001\022A\n\006status\030\004 \001(\0132,.googl" - + "e.cloud.dataproc.v1beta2.ClusterStatusB\003" - + "\340A\003\022I\n\016status_history\030\007 \003(\0132,.google.clo" - + "ud.dataproc.v1beta2.ClusterStatusB\003\340A\003\022\031" - + "\n\014cluster_uuid\030\006 \001(\tB\003\340A\003\022C\n\007metrics\030\t \001" - + "(\0132-.google.cloud.dataproc.v1beta2.Clust" - + "erMetricsB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" - + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\201\010\n\rClusterConfig\022" - + "\032\n\rconfig_bucket\030\001 \001(\tB\003\340A\001\022P\n\022gce_clust" - + "er_config\030\010 \001(\0132/.google.cloud.dataproc." - + "v1beta2.GceClusterConfigB\003\340A\001\022N\n\rmaster_" - + "config\030\t \001(\01322.google.cloud.dataproc.v1b" - + "eta2.InstanceGroupConfigB\003\340A\001\022N\n\rworker_" - + "config\030\n \001(\01322.google.cloud.dataproc.v1b" - + "eta2.InstanceGroupConfigB\003\340A\001\022X\n\027seconda" - + "ry_worker_config\030\014 \001(\01322.google.cloud.da" - + "taproc.v1beta2.InstanceGroupConfigB\003\340A\001\022" - + "K\n\017software_config\030\r \001(\0132-.google.cloud." - + "dataproc.v1beta2.SoftwareConfigB\003\340A\001\022M\n\020" - + "lifecycle_config\030\016 \001(\0132..google.cloud.da" - + "taproc.v1beta2.LifecycleConfigB\003\340A\001\022\\\n\026i" - + "nitialization_actions\030\013 \003(\01327.google.clo" - + "ud.dataproc.v1beta2.NodeInitializationAc" - + "tionB\003\340A\001\022O\n\021encryption_config\030\017 \001(\0132/.g" - + "oogle.cloud.dataproc.v1beta2.EncryptionC" - + "onfigB\003\340A\001\022Q\n\022autoscaling_config\030\020 \001(\01320" - + ".google.cloud.dataproc.v1beta2.Autoscali" - + "ngConfigB\003\340A\001\022K\n\017endpoint_config\030\021 \001(\0132-" - + ".google.cloud.dataproc.v1beta2.EndpointC" - + "onfigB\003\340A\001\022K\n\017security_config\030\022 \001(\0132-.go" - + "ogle.cloud.dataproc.v1beta2.SecurityConf" - + "igB\003\340A\001\022P\n\022gke_cluster_config\030\023 \001(\0132/.go" - + "ogle.cloud.dataproc.v1beta2.GkeClusterCo" - + "nfigB\003\340A\001\"\230\002\n\020GkeClusterConfig\022|\n namesp" - + "aced_gke_deployment_target\030\001 \001(\0132M.googl" - + "e.cloud.dataproc.v1beta2.GkeClusterConfi" - + "g.NamespacedGkeDeploymentTargetB\003\340A\001\032\205\001\n" - + "\035NamespacedGkeDeploymentTarget\022D\n\022target" - + "_gke_cluster\030\001 \001(\tB(\340A\001\372A\"\n container.go" - + "ogleapis.com/Cluster\022\036\n\021cluster_namespac" - + "e\030\002 \001(\tB\003\340A\001\"\277\001\n\016EndpointConfig\022U\n\nhttp_" - + "ports\030\001 \003(\0132<.google.cloud.dataproc.v1be" - + "ta2.EndpointConfig.HttpPortsEntryB\003\340A\003\022$" - + "\n\027enable_http_port_access\030\002 \001(\010B\003\340A\001\0320\n\016" - + "HttpPortsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001\",\n\021AutoscalingConfig\022\027\n\npolicy_ur" - + "i\030\001 \001(\tB\003\340A\001\"4\n\020EncryptionConfig\022 \n\023gce_" - + "pd_kms_key_name\030\001 \001(\tB\003\340A\001\"\251\003\n\020GceCluste" - + "rConfig\022\025\n\010zone_uri\030\001 \001(\tB\003\340A\001\022\030\n\013networ" - + "k_uri\030\002 \001(\tB\003\340A\001\022\033\n\016subnetwork_uri\030\006 \001(\t" - + "B\003\340A\001\022\035\n\020internal_ip_only\030\007 \001(\010B\003\340A\001\022\034\n\017" - + "service_account\030\010 \001(\tB\003\340A\001\022#\n\026service_ac" - + "count_scopes\030\003 \003(\tB\003\340A\001\022\014\n\004tags\030\004 \003(\t\022O\n" - + "\010metadata\030\005 \003(\0132=.google.cloud.dataproc." - + "v1beta2.GceClusterConfig.MetadataEntry\022U" - + "\n\024reservation_affinity\030\013 \001(\01322.google.cl" - + "oud.dataproc.v1beta2.ReservationAffinity" - + "B\003\340A\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001\"\244\003\n\023InstanceGroupConfig\022\032" - + "\n\rnum_instances\030\001 \001(\005B\003\340A\001\022\033\n\016instance_n" - + "ames\030\002 \003(\tB\003\340A\003\022\026\n\timage_uri\030\003 \001(\tB\003\340A\001\022" - + "\035\n\020machine_type_uri\030\004 \001(\tB\003\340A\001\022C\n\013disk_c" - + "onfig\030\005 \001(\0132).google.cloud.dataproc.v1be" - + "ta2.DiskConfigB\003\340A\001\022\033\n\016is_preemptible\030\006 " - + "\001(\010B\003\340A\003\022T\n\024managed_group_config\030\007 \001(\01321" - + ".google.cloud.dataproc.v1beta2.ManagedGr" - + "oupConfigB\003\340A\003\022K\n\014accelerators\030\010 \003(\01320.g" - + "oogle.cloud.dataproc.v1beta2.Accelerator" - + "ConfigB\003\340A\001\022\030\n\020min_cpu_platform\030\t \001(\t\"c\n" - + "\022ManagedGroupConfig\022#\n\026instance_template" - + "_name\030\001 \001(\tB\003\340A\003\022(\n\033instance_group_manag" - + "er_name\030\002 \001(\tB\003\340A\003\"L\n\021AcceleratorConfig\022" - + "\034\n\024accelerator_type_uri\030\001 \001(\t\022\031\n\021acceler" - + "ator_count\030\002 \001(\005\"a\n\nDiskConfig\022\033\n\016boot_d" - + "isk_type\030\003 \001(\tB\003\340A\001\022\036\n\021boot_disk_size_gb" - + "\030\001 \001(\005B\003\340A\001\022\026\n\016num_local_ssds\030\002 \001(\005\"\203\002\n\017" - + "LifecycleConfig\0227\n\017idle_delete_ttl\030\001 \001(\013" - + "2\031.google.protobuf.DurationB\003\340A\001\022;\n\020auto" - + "_delete_time\030\002 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\001H\000\0229\n\017auto_delete_ttl\030\003 \001(\0132\031" - + ".google.protobuf.DurationB\003\340A\001H\000\0228\n\017idle" - + "_start_time\030\004 \001(\0132\032.google.protobuf.Time" - + "stampB\003\340A\003B\005\n\003ttl\"X\n\016SecurityConfig\022F\n\017k" - + "erberos_config\030\001 \001(\0132-.google.cloud.data" - + "proc.v1beta2.KerberosConfig\"\220\004\n\016Kerberos" - + "Config\022\034\n\017enable_kerberos\030\001 \001(\010B\003\340A\001\022(\n\033" - + "root_principal_password_uri\030\002 \001(\tB\003\340A\002\022\030" - + "\n\013kms_key_uri\030\003 \001(\tB\003\340A\002\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\020" - + "key_password_uri\030\007 \001(\tB\003\340A\001\022$\n\027truststor" - + "e_password_uri\030\010 \001(\tB\003\340A\001\022$\n\027cross_realm" - + "_trust_realm\030\t \001(\tB\003\340A\001\022\"\n\025cross_realm_t" - + "rust_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\016" - + "kdc_db_key_uri\030\r \001(\tB\003\340A\001\022\037\n\022tgt_lifetim" - + "e_hours\030\016 \001(\005B\003\340A\001\022\022\n\005realm\030\017 \001(\tB\003\340A\001\"s" - + "\n\030NodeInitializationAction\022\034\n\017executable" - + "_file\030\001 \001(\tB\003\340A\002\0229\n\021execution_timeout\030\002 " - + "\001(\0132\031.google.protobuf.DurationB\003\340A\001\"\264\003\n\r" - + "ClusterStatus\022F\n\005state\030\001 \001(\01622.google.cl" - + "oud.dataproc.v1beta2.ClusterStatus.State" - + "B\003\340A\003\022\023\n\006detail\030\002 \001(\tB\003\340A\003\0229\n\020state_star" - + "t_time\030\003 \001(\0132\032.google.protobuf.Timestamp" - + "B\003\340A\003\022L\n\010substate\030\004 \001(\01625.google.cloud.d" - + "ataproc.v1beta2.ClusterStatus.SubstateB\003" - + "\340A\003\"\177\n\005State\022\013\n\007UNKNOWN\020\000\022\014\n\010CREATING\020\001\022" - + "\013\n\007RUNNING\020\002\022\t\n\005ERROR\020\003\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\010Substate\022\017\n\013UNSPECIFIED\020" - + "\000\022\r\n\tUNHEALTHY\020\001\022\020\n\014STALE_STATUS\020\002\"\376\001\n\016S" - + "oftwareConfig\022\032\n\rimage_version\030\001 \001(\tB\003\340A" - + "\001\022V\n\nproperties\030\002 \003(\0132=.google.cloud.dat" - + "aproc.v1beta2.SoftwareConfig.PropertiesE" - + "ntryB\003\340A\001\022E\n\023optional_components\030\003 \003(\0162(" - + ".google.cloud.dataproc.v1beta2.Component" - + "\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\244\002\n\016ClusterMetrics\022T\n\014hdfs_m" - + "etrics\030\001 \003(\0132>.google.cloud.dataproc.v1b" - + "eta2.ClusterMetrics.HdfsMetricsEntry\022T\n\014" - + "yarn_metrics\030\002 \003(\0132>.google.cloud.datapr" - + "oc.v1beta2.ClusterMetrics.YarnMetricsEnt" - + "ry\0322\n\020HdfsMetricsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\003:\0028\001\0322\n\020YarnMetricsEntry\022\013\n\003ke" - + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\"\233\001\n\024CreateClu" - + "sterRequest\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<\n\007cluster\030\002 \001(\0132&.goo" - + "gle.cloud.dataproc.v1beta2.ClusterB\003\340A\002\022" - + "\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"\263\002\n\024UpdateClust" - + "erRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006re" - + "gion\030\005 \001(\tB\003\340A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340" - + "A\002\022<\n\007cluster\030\003 \001(\0132&.google.cloud.datap" - + "roc.v1beta2.ClusterB\003\340A\002\022E\n\035graceful_dec" - + "ommission_timeout\030\006 \001(\0132\031.google.protobu" - + "f.DurationB\003\340A\001\0224\n\013update_mask\030\004 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\003\340A\002\022\027\n\nrequest" - + "_id\030\007 \001(\tB\003\340A\001\"\223\001\n\024DeleteClusterRequest\022" - + "\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\t" - + "B\003\340A\002\022\031\n\014cluster_name\030\002 \001(\tB\003\340A\002\022\031\n\014clus" - + "ter_uuid\030\004 \001(\tB\003\340A\001\022\027\n\nrequest_id\030\005 \001(\tB" - + "\003\340A\001\"\\\n\021GetClusterRequest\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\014clust" - + "er_name\030\002 \001(\tB\003\340A\002\"\211\001\n\023ListClustersReque" - + "st\022\027\n\nproject_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_si" - + "ze\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\"s" - + "\n\024ListClustersResponse\022=\n\010clusters\030\001 \003(\013" - + "2&.google.cloud.dataproc.v1beta2.Cluster" - + "B\003\340A\003\022\034\n\017next_page_token\030\002 \001(\tB\003\340A\003\"a\n\026D" - + "iagnoseClusterRequest\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_n" - + "ame\030\002 \001(\tB\003\340A\002\"1\n\026DiagnoseClusterResults" - + "\022\027\n\noutput_uri\030\001 \001(\tB\003\340A\003\"\375\001\n\023Reservatio" - + "nAffinity\022^\n\030consume_reservation_type\030\001 " - + "\001(\01627.google.cloud.dataproc.v1beta2.Rese" - + "rvationAffinity.TypeB\003\340A\001\022\020\n\003key\030\002 \001(\tB\003" - + "\340A\001\022\023\n\006values\030\003 \003(\tB\003\340A\001\"_\n\004Type\022\024\n\020TYPE" - + "_UNSPECIFIED\020\000\022\022\n\016NO_RESERVATION\020\001\022\023\n\017AN" - + "Y_RESERVATION\020\002\022\030\n\024SPECIFIC_RESERVATION\020" - + "\0032\347\r\n\021ClusterController\022\221\002\n\rCreateCluste" - + "r\0223.google.cloud.dataproc.v1beta2.Create" - + "ClusterRequest\032\035.google.longrunning.Oper" - + "ation\"\253\001\202\323\344\223\002C\"8/v1beta2/projects/{proje" - + "ct_id}/regions/{region}/clusters:\007cluste" - + "r\332A\033project_id, region, cluster\312AA\n\007Clus" - + "ter\0226google.cloud.dataproc.v1beta2.Clust" - + "erOperationMetadata\022\273\002\n\rUpdateCluster\0223." - + "google.cloud.dataproc.v1beta2.UpdateClus" - + "terRequest\032\035.google.longrunning.Operatio" - + "n\"\325\001\202\323\344\223\002R2G/v1beta2/projects/{project_i" - + "d}/regions/{region}/clusters/{cluster_na" - + "me}:\007cluster\332A6project_id, region, clust" - + "er_name, cluster, update_mask\312AA\n\007Cluste" - + "r\0226google.cloud.dataproc.v1beta2.Cluster" - + "OperationMetadata\022\252\002\n\rDeleteCluster\0223.go" - + "ogle.cloud.dataproc.v1beta2.DeleteCluste" - + "rRequest\032\035.google.longrunning.Operation\"" - + "\304\001\202\323\344\223\002I*G/v1beta2/projects/{project_id}" - + "/regions/{region}/clusters/{cluster_name" - + "}\332A project_id, region, cluster_name\312AO\n" - + "\025google.protobuf.Empty\0226google.cloud.dat" - + "aproc.v1beta2.ClusterOperationMetadata\022\332" - + "\001\n\nGetCluster\0220.google.cloud.dataproc.v1" - + "beta2.GetClusterRequest\032&.google.cloud.d" - + "ataproc.v1beta2.Cluster\"r\202\323\344\223\002I\022G/v1beta" - + "2/projects/{project_id}/regions/{region}" - + "/clusters/{cluster_name}\332A project_id, r" - + "egion, cluster_name\022\353\001\n\014ListClusters\0222.g" - + "oogle.cloud.dataproc.v1beta2.ListCluster" - + "sRequest\0323.google.cloud.dataproc.v1beta2" - + ".ListClustersResponse\"r\202\323\344\223\002:\0228/v1beta2/" - + "projects/{project_id}/regions/{region}/c" - + "lusters\332A\022project_id, region\332A\032project_i" - + "d, region, filter\022\272\002\n\017DiagnoseCluster\0225." - + "google.cloud.dataproc.v1beta2.DiagnoseCl" - + "usterRequest\032\035.google.longrunning.Operat" - + "ion\"\320\001\202\323\344\223\002U\"P/v1beta2/projects/{project" - + "_id}/regions/{region}/clusters/{cluster_" - + "name}:diagnose:\001*\332A project_id, region, " - + "cluster_name\312AO\n\025google.protobuf.Empty\0226" - + "google.cloud.dataproc.v1beta2.ClusterOpe" - + "rationMetadata\032K\312A\027dataproc.googleapis.c" - + "om\322A.https://www.googleapis.com/auth/clo" - + "ud-platformB{\n!com.google.cloud.dataproc" - + ".v1beta2B\rClustersProtoP\001ZEgoogle.golang" - + ".org/genproto/googleapis/cloud/dataproc/" - + "v1beta2;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.v1beta2.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_v1beta2_Cluster_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_Cluster_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_Cluster_descriptor, - new java.lang.String[] { - "ProjectId", - "ClusterName", - "Config", - "Labels", - "Status", - "StatusHistory", - "ClusterUuid", - "Metrics", - }); - internal_static_google_cloud_dataproc_v1beta2_Cluster_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_Cluster_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_Cluster_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_Cluster_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterConfig_descriptor, - new java.lang.String[] { - "ConfigBucket", - "GceClusterConfig", - "MasterConfig", - "WorkerConfig", - "SecondaryWorkerConfig", - "SoftwareConfig", - "LifecycleConfig", - "InitializationActions", - "EncryptionConfig", - "AutoscalingConfig", - "EndpointConfig", - "SecurityConfig", - "GkeClusterConfig", - }); - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor, - new java.lang.String[] { - "NamespacedGkeDeploymentTarget", - }); - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_descriptor = - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_descriptor, - new java.lang.String[] { - "TargetGkeCluster", "ClusterNamespace", - }); - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_descriptor, - new java.lang.String[] { - "HttpPorts", "EnableHttpPortAccess", - }); - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_HttpPortsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_HttpPortsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_HttpPortsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_AutoscalingConfig_descriptor, - new java.lang.String[] { - "PolicyUri", - }); - internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_descriptor, - new java.lang.String[] { - "GcePdKmsKeyName", - }); - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_descriptor, - new java.lang.String[] { - "ZoneUri", - "NetworkUri", - "SubnetworkUri", - "InternalIpOnly", - "ServiceAccount", - "ServiceAccountScopes", - "Tags", - "Metadata", - "ReservationAffinity", - }); - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_MetadataEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_MetadataEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_MetadataEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_descriptor, - new java.lang.String[] { - "NumInstances", - "InstanceNames", - "ImageUri", - "MachineTypeUri", - "DiskConfig", - "IsPreemptible", - "ManagedGroupConfig", - "Accelerators", - "MinCpuPlatform", - }); - internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_descriptor, - new java.lang.String[] { - "InstanceTemplateName", "InstanceGroupManagerName", - }); - internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_AcceleratorConfig_descriptor, - new java.lang.String[] { - "AcceleratorTypeUri", "AcceleratorCount", - }); - internal_static_google_cloud_dataproc_v1beta2_DiskConfig_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1beta2_DiskConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_DiskConfig_descriptor, - new java.lang.String[] { - "BootDiskType", "BootDiskSizeGb", "NumLocalSsds", - }); - internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_descriptor, - new java.lang.String[] { - "IdleDeleteTtl", "AutoDeleteTime", "AutoDeleteTtl", "IdleStartTime", "Ttl", - }); - internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_descriptor, - new java.lang.String[] { - "KerberosConfig", - }); - internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_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_v1beta2_NodeInitializationAction_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_descriptor, - new java.lang.String[] { - "ExecutableFile", "ExecutionTimeout", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterStatus_descriptor, - new java.lang.String[] { - "State", "Detail", "StateStartTime", "Substate", - }); - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_descriptor, - new java.lang.String[] { - "ImageVersion", "Properties", "OptionalComponents", - }); - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_descriptor, - new java.lang.String[] { - "HdfsMetrics", "YarnMetrics", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_HdfsMetricsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_HdfsMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_HdfsMetricsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_YarnMetricsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_YarnMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterMetrics_YarnMetricsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "Cluster", "RequestId", - }); - internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", - "Region", - "ClusterName", - "Cluster", - "GracefulDecommissionTimeout", - "UpdateMask", - "RequestId", - }); - internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", "ClusterUuid", "RequestId", - }); - internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", - }); - internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_descriptor, - new java.lang.String[] { - "Clusters", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "ClusterName", - }); - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_descriptor, - new java.lang.String[] { - "OutputUri", - }); - internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_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.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.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Component.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Component.java deleted file mode 100644 index 2e615875..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Component.java +++ /dev/null @@ -1,396 +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/v1beta2/shared.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Cluster components that can be activated.
- * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.Component} - */ -public enum Component implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Unspecified component.
-   * 
- * - * COMPONENT_UNSPECIFIED = 0; - */ - COMPONENT_UNSPECIFIED(0), - /** - * - * - *
-   * The Anaconda python distribution.
-   * 
- * - * ANACONDA = 5; - */ - ANACONDA(5), - /** - * - * - *
-   * Docker
-   * 
- * - * DOCKER = 13; - */ - DOCKER(13), - /** - * - * - *
-   * The Druid query engine.
-   * 
- * - * DRUID = 9; - */ - DRUID(9), - /** - * - * - *
-   * Flink
-   * 
- * - * FLINK = 14; - */ - FLINK(14), - /** - * - * - *
-   * The Hive Web HCatalog (the REST service for accessing HCatalog).
-   * 
- * - * HIVE_WEBHCAT = 3; - */ - HIVE_WEBHCAT(3), - /** - * - * - *
-   * The Jupyter Notebook.
-   * 
- * - * JUPYTER = 1; - */ - JUPYTER(1), - /** - * - * - *
-   * The Kerberos security feature.
-   * 
- * - * KERBEROS = 7; - */ - KERBEROS(7), - /** - * - * - *
-   * 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.
-   * 
- * - * COMPONENT_UNSPECIFIED = 0; - */ - public static final int COMPONENT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * The Anaconda python distribution.
-   * 
- * - * ANACONDA = 5; - */ - public static final int ANACONDA_VALUE = 5; - /** - * - * - *
-   * Docker
-   * 
- * - * DOCKER = 13; - */ - public static final int DOCKER_VALUE = 13; - /** - * - * - *
-   * The Druid query engine.
-   * 
- * - * DRUID = 9; - */ - public static final int DRUID_VALUE = 9; - /** - * - * - *
-   * Flink
-   * 
- * - * FLINK = 14; - */ - public static final int FLINK_VALUE = 14; - /** - * - * - *
-   * 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 Kerberos security feature.
-   * 
- * - * KERBEROS = 7; - */ - public static final int KERBEROS_VALUE = 7; - /** - * - * - *
-   * 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 3: - return HIVE_WEBHCAT; - case 1: - return JUPYTER; - case 7: - return KERBEROS; - 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.v1beta2.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.v1beta2.Component) -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequest.java deleted file mode 100644 index 47798a97..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequest.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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to create an autoscaling policy.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest} - */ -public final class CreateAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.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
-   *   has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   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
-   *   has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   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.v1beta2.AutoscalingPolicy policy_; - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy() { - return policy_ == null - ? com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getParentBytes().isEmpty()) { - 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 (!getParentBytes().isEmpty()) { - 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.v1beta2.CreateAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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
-     *   has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   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
-     *   has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   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
-     *   has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   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
-     *   has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   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
-     *   has the following format:
-     *   `projects/{project_id}/regions/{region}`
-     * * For `projects.locations.autoscalingPolicies.create`, the resource name
-     *   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.v1beta2.AutoscalingPolicy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null - ? com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance() - : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy(com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePolicy(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null - ? com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - } - /** - * - * - *
-     * Required. The autoscaling policy to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateAutoscalingPolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index 6bbdaea6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface CreateAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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
-   *   has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   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
-   *   has the following format:
-   *   `projects/{project_id}/regions/{region}`
-   * * For `projects.locations.autoscalingPolicies.create`, the resource name
-   *   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.v1beta2.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.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy(); - /** - * - * - *
-   * Required. The autoscaling policy to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequest.java deleted file mode 100644 index 0cd35962..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequest.java +++ /dev/null @@ -1,1359 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to create a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.CreateClusterRequest} - */ -public final class CreateClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - } - - @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.v1beta2.Cluster.Builder subBuilder = null; - if (cluster_ != null) { - subBuilder = cluster_.toBuilder(); - } - cluster_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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; - } - 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CreateClusterRequest.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster_; - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Cluster getCluster() { - return cluster_ == null - ? com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance() - : cluster_; - } - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (cluster_ != null) { - output.writeMessage(2, getCluster()); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (cluster_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCluster()); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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.v1beta2.CreateClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.CreateClusterRequest other = - (com.google.cloud.dataproc.v1beta2.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 (!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 = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.CreateClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.CreateClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.CreateClusterRequest) - com.google.cloud.dataproc.v1beta2.CreateClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CreateClusterRequest.class, - com.google.cloud.dataproc.v1beta2.CreateClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_CreateClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.CreateClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateClusterRequest build() { - com.google.cloud.dataproc.v1beta2.CreateClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateClusterRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.CreateClusterRequest result = - new com.google.cloud.dataproc.v1beta2.CreateClusterRequest(this); - result.projectId_ = projectId_; - result.region_ = region_; - if (clusterBuilder_ == null) { - result.cluster_ = cluster_; - } else { - result.cluster_ = clusterBuilder_.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.v1beta2.CreateClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.CreateClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.CreateClusterRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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(); - } - 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.v1beta2.CreateClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> - clusterBuilder_; - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - public com.google.cloud.dataproc.v1beta2.Cluster getCluster() { - if (clusterBuilder_ == null) { - return cluster_ == null - ? com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance() - : cluster_; - } else { - return clusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeCluster(com.google.cloud.dataproc.v1beta2.Cluster value) { - if (clusterBuilder_ == null) { - if (cluster_ != null) { - cluster_ = - com.google.cloud.dataproc.v1beta2.Cluster.newBuilder(cluster_) - .mergeFrom(value) - .buildPartial(); - } else { - cluster_ = value; - } - onChanged(); - } else { - clusterBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.Cluster.Builder getClusterBuilder() { - - onChanged(); - return getClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOrBuilder getClusterOrBuilder() { - if (clusterBuilder_ != null) { - return clusterBuilder_.getMessageOrBuilder(); - } else { - return cluster_ == null - ? com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance() - : cluster_; - } - } - /** - * - * - *
-     * Required. The cluster to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> - getClusterFieldBuilder() { - if (clusterBuilder_ == null) { - clusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.CreateClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.CreateClusterRequest) - private static final com.google.cloud.dataproc.v1beta2.CreateClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.CreateClusterRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequestOrBuilder.java deleted file mode 100644 index 2b3da599..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateClusterRequestOrBuilder.java +++ /dev/null @@ -1,159 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface CreateClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - com.google.cloud.dataproc.v1beta2.Cluster getCluster(); - /** - * - * - *
-   * Required. The cluster to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder getClusterOrBuilder(); - - /** - * - * - *
-   * Optional. A unique id used to identify the request. If the server
-   * receives two [CreateClusterRequest][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests  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(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequest.java deleted file mode 100644 index 846ca5f0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequest.java +++ /dev/null @@ -1,1010 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to create a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest} - */ -public final class CreateWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate.Builder subBuilder = null; - if (template_ != null) { - subBuilder = template_.toBuilder(); - } - template_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template_; - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate() { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getParentBytes().isEmpty()) { - 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 (!getParentBytes().isEmpty()) { - 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.v1beta2.CreateWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest) - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - templateBuilder_; - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate() { - if (templateBuilder_ == null) { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } else { - return templateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTemplate(com.google.cloud.dataproc.v1beta2.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (template_ != null) { - template_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder getTemplateBuilder() { - - onChanged(); - return getTemplateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - if (templateBuilder_ != null) { - return templateBuilder_.getMessageOrBuilder(); - } else { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } - } - /** - * - * - *
-     * Required. The Dataproc workflow template to create.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - getTemplateFieldBuilder() { - if (templateBuilder_ == null) { - templateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.CreateWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.CreateWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/CreateWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 4ba974f3..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface CreateWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate(); - /** - * - * - *
-   * Required. The Dataproc workflow template to create.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequest.java deleted file mode 100644 index e811f0f0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequest.java +++ /dev/null @@ -1,710 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.DeleteAutoscalingPolicyRequest} - */ -public final class DeleteAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteAutoscalingPolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index ae1d39b8..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DeleteAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequest.java deleted file mode 100644 index 947de2cc..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequest.java +++ /dev/null @@ -1,1423 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to delete a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.DeleteClusterRequest} - */ -public final class DeleteClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest.class, - com.google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!getClusterUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterUuid_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!getClusterUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterUuid_); - } - if (!getRequestIdBytes().isEmpty()) { - 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.v1beta2.DeleteClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DeleteClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DeleteClusterRequest) - com.google.cloud.dataproc.v1beta2.DeleteClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest.class, - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DeleteClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteClusterRequest build() { - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteClusterRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.DeleteClusterRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DeleteClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.DeleteClusterRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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.v1beta2.DeleteClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DeleteClusterRequest) - private static final com.google.cloud.dataproc.v1beta2.DeleteClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DeleteClusterRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequestOrBuilder.java deleted file mode 100644 index 33b16e97..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteClusterRequestOrBuilder.java +++ /dev/null @@ -1,170 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DeleteClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests  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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequest.java deleted file mode 100644 index 45646356..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequest.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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to delete a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.DeleteJobRequest} - */ -public final class DeleteJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteJobRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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.v1beta2.DeleteJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DeleteJobRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DeleteJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DeleteJobRequest) - com.google.cloud.dataproc.v1beta2.DeleteJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteJobRequest.class, - com.google.cloud.dataproc.v1beta2.DeleteJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DeleteJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteJobRequest build() { - com.google.cloud.dataproc.v1beta2.DeleteJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteJobRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.DeleteJobRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DeleteJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.DeleteJobRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DeleteJobRequest) - private static final com.google.cloud.dataproc.v1beta2.DeleteJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DeleteJobRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteJobRequestOrBuilder.java deleted file mode 100644 index 2f77f5b1..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DeleteJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequest.java deleted file mode 100644 index 76294192..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequest.java +++ /dev/null @@ -1,807 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to delete a workflow template.
- * Currently started workflows will remain running.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest} - */ -public final class DeleteWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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 (!getNameBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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.v1beta2.DeleteWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest) - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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.v1beta2.DeleteWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DeleteWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DeleteWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DeleteWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 004ab668..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DeleteWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @return The version. - */ - int getVersion(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequest.java deleted file mode 100644 index af189027..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequest.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to collect cluster diagnostic information.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.DiagnoseClusterRequest} - */ -public final class DiagnoseClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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.v1beta2.DiagnoseClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DiagnoseClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DiagnoseClusterRequest) - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest.class, - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest build() { - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DiagnoseClusterRequest) - private static final com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DiagnoseClusterRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterRequestOrBuilder.java deleted file mode 100644 index 05f7f69a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DiagnoseClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResults.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResults.java deleted file mode 100644 index cfa973b3..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResults.java +++ /dev/null @@ -1,651 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The location of diagnostic output.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.DiagnoseClusterResults} - */ -public final class DiagnoseClusterResults extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults.class, - com.google.cloud.dataproc.v1beta2.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 (!getOutputUriBytes().isEmpty()) { - 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 (!getOutputUriBytes().isEmpty()) { - 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.v1beta2.DiagnoseClusterResults)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DiagnoseClusterResults} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DiagnoseClusterResults) - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResultsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults.class, - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiagnoseClusterResults_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults build() { - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults buildPartial() { - com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DiagnoseClusterResults) - private static final com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DiagnoseClusterResults(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiagnoseClusterResults getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResultsOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiagnoseClusterResultsOrBuilder.java deleted file mode 100644 index 4bc19a2a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DiagnoseClusterResultsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfig.java deleted file mode 100644 index 34e5e157..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfig.java +++ /dev/null @@ -1,848 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies the config of disk options for a group of VM instances.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.DiskConfig} - */ -public final class DiskConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - } - - @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; - } - 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiskConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiskConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DiskConfig.class, - com.google.cloud.dataproc.v1beta2.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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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_; - /** - * - * - *
-   * 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; - * - * @return The numLocalSsds. - */ - @java.lang.Override - public int getNumLocalSsds() { - return numLocalSsds_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (!getBootDiskTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, bootDiskType_); - } - 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 (!getBootDiskTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, bootDiskType_); - } - 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.v1beta2.DiskConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.DiskConfig other = - (com.google.cloud.dataproc.v1beta2.DiskConfig) obj; - - if (!getBootDiskType().equals(other.getBootDiskType())) return false; - if (getBootDiskSizeGb() != other.getBootDiskSizeGb()) return false; - if (getNumLocalSsds() != other.getNumLocalSsds()) 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 = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.DiskConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.DiskConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.DiskConfig) - com.google.cloud.dataproc.v1beta2.DiskConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiskConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiskConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.DiskConfig.class, - com.google.cloud.dataproc.v1beta2.DiskConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_DiskConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiskConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.DiskConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiskConfig build() { - com.google.cloud.dataproc.v1beta2.DiskConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiskConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.DiskConfig result = - new com.google.cloud.dataproc.v1beta2.DiskConfig(this); - result.bootDiskType_ = bootDiskType_; - result.bootDiskSizeGb_ = bootDiskSizeGb_; - result.numLocalSsds_ = numLocalSsds_; - 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.v1beta2.DiskConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.DiskConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.DiskConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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()); - } - 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.v1beta2.DiskConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-     * "pd-standard" (Persistent Disk Hard Disk Drive).
-     * 
- * - * 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_; - /** - * - * - *
-     * 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; - * - * @return The numLocalSsds. - */ - @java.lang.Override - public int getNumLocalSsds() { - return numLocalSsds_; - } - /** - * - * - *
-     * 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; - * - * @param value The numLocalSsds to set. - * @return This builder for chaining. - */ - public Builder setNumLocalSsds(int value) { - - numLocalSsds_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * 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; - * - * @return This builder for chaining. - */ - public Builder clearNumLocalSsds() { - - numLocalSsds_ = 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.v1beta2.DiskConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.DiskConfig) - private static final com.google.cloud.dataproc.v1beta2.DiskConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.DiskConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfigOrBuilder.java deleted file mode 100644 index af2644cc..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/DiskConfigOrBuilder.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface DiskConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.DiskConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Type of the boot disk (default is "pd-standard").
-   * Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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-ssd" (Persistent Disk Solid State Drive) or
-   * "pd-standard" (Persistent Disk Hard Disk Drive).
-   * 
- * - * 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(); - - /** - * - * - *
-   * 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; - * - * @return The numLocalSsds. - */ - int getNumLocalSsds(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfig.java deleted file mode 100644 index 4eb50911..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfig.java +++ /dev/null @@ -1,643 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Encryption settings for the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.EncryptionConfig} - */ -public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.EncryptionConfig.class, - com.google.cloud.dataproc.v1beta2.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 (!getGcePdKmsKeyNameBytes().isEmpty()) { - 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 (!getGcePdKmsKeyNameBytes().isEmpty()) { - 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.v1beta2.EncryptionConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.EncryptionConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.EncryptionConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.EncryptionConfig) - com.google.cloud.dataproc.v1beta2.EncryptionConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.EncryptionConfig.class, - com.google.cloud.dataproc.v1beta2.EncryptionConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EncryptionConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EncryptionConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.EncryptionConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EncryptionConfig build() { - com.google.cloud.dataproc.v1beta2.EncryptionConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EncryptionConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.EncryptionConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.EncryptionConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.EncryptionConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.EncryptionConfig) - private static final com.google.cloud.dataproc.v1beta2.EncryptionConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.EncryptionConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EncryptionConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EncryptionConfigOrBuilder.java deleted file mode 100644 index 03b5be82..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface EncryptionConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfig.java deleted file mode 100644 index bcc478ee..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfig.java +++ /dev/null @@ -1,900 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Endpoint config for this cluster
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.EndpointConfig} - */ -public final class EndpointConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.EndpointConfig.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.EndpointConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.EndpointConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.EndpointConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.EndpointConfig) - com.google.cloud.dataproc.v1beta2.EndpointConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.EndpointConfig.class, - com.google.cloud.dataproc.v1beta2.EndpointConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_EndpointConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EndpointConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.EndpointConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EndpointConfig build() { - com.google.cloud.dataproc.v1beta2.EndpointConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.EndpointConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.EndpointConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.EndpointConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.EndpointConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.EndpointConfig) - private static final com.google.cloud.dataproc.v1beta2.EndpointConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.EndpointConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.EndpointConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/EndpointConfigOrBuilder.java deleted file mode 100644 index 3beb1ad2..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface EndpointConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfig.java deleted file mode 100644 index 27e8b2ea..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfig.java +++ /dev/null @@ -1,2870 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Common config settings for resources of Compute Engine cluster
- * instances, applicable to all instances in the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GceClusterConfig} - */ -public final class GceClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - 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.v1beta2.ReservationAffinity.Builder subBuilder = null; - if (reservationAffinity_ != null) { - subBuilder = reservationAffinity_.toBuilder(); - } - reservationAffinity_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ReservationAffinity.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationAffinity_); - reservationAffinity_ = 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GceClusterConfig.class, - com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder.class); - } - - 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 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_cloud_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_cloud_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ReservationAffinity reservationAffinity_; - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinity getReservationAffinity() { - return reservationAffinity_ == null - ? com.google.cloud.dataproc.v1beta2.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder - getReservationAffinityOrBuilder() { - return getReservationAffinity(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getZoneUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zoneUri_); - } - if (!getNetworkUriBytes().isEmpty()) { - 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 (!getSubnetworkUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, subnetworkUri_); - } - if (internalIpOnly_ != false) { - output.writeBool(7, internalIpOnly_); - } - if (!getServiceAccountBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceAccount_); - } - if (reservationAffinity_ != null) { - output.writeMessage(11, getReservationAffinity()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getZoneUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zoneUri_); - } - if (!getNetworkUriBytes().isEmpty()) { - 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 (!getSubnetworkUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, subnetworkUri_); - } - if (internalIpOnly_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, internalIpOnly_); - } - if (!getServiceAccountBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceAccount_); - } - if (reservationAffinity_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(11, getReservationAffinity()); - } - 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.v1beta2.GceClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GceClusterConfig other = - (com.google.cloud.dataproc.v1beta2.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 (!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 (!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) + 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(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.GceClusterConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GceClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GceClusterConfig) - com.google.cloud.dataproc.v1beta2.GceClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GceClusterConfig.class, - com.google.cloud.dataproc.v1beta2.GceClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - - 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; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GceClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GceClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GceClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GceClusterConfig build() { - com.google.cloud.dataproc.v1beta2.GceClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GceClusterConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.GceClusterConfig result = - new com.google.cloud.dataproc.v1beta2.GceClusterConfig(this); - int from_bitField0_ = bitField0_; - result.zoneUri_ = zoneUri_; - result.networkUri_ = networkUri_; - result.subnetworkUri_ = subnetworkUri_; - result.internalIpOnly_ = internalIpOnly_; - 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(); - } - 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.v1beta2.GceClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.GceClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.GceClusterConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.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()); - } - 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.v1beta2.GceClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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 java.lang.Object serviceAccount_ = ""; - /** - * - * - *
-     * Optional. The [Dataproc service
-     * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_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_cloud_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_cloud_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_cloud_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_cloud_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.v1beta2.ReservationAffinity reservationAffinity_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ReservationAffinity, - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Builder, - com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder> - reservationAffinityBuilder_; - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - public com.google.cloud.dataproc.v1beta2.ReservationAffinity getReservationAffinity() { - if (reservationAffinityBuilder_ == null) { - return reservationAffinity_ == null - ? com.google.cloud.dataproc.v1beta2.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } else { - return reservationAffinityBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReservationAffinity( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReservationAffinity( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReservationAffinity( - com.google.cloud.dataproc.v1beta2.ReservationAffinity value) { - if (reservationAffinityBuilder_ == null) { - if (reservationAffinity_ != null) { - reservationAffinity_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.ReservationAffinity.Builder - getReservationAffinityBuilder() { - - onChanged(); - return getReservationAffinityFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder - getReservationAffinityOrBuilder() { - if (reservationAffinityBuilder_ != null) { - return reservationAffinityBuilder_.getMessageOrBuilder(); - } else { - return reservationAffinity_ == null - ? com.google.cloud.dataproc.v1beta2.ReservationAffinity.getDefaultInstance() - : reservationAffinity_; - } - } - /** - * - * - *
-     * Optional. Reservation Affinity for consuming Zonal reservation.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ReservationAffinity, - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Builder, - com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder> - getReservationAffinityFieldBuilder() { - if (reservationAffinityBuilder_ == null) { - reservationAffinityBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ReservationAffinity, - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Builder, - com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder>( - getReservationAffinity(), getParentForChildren(), isClean()); - reservationAffinity_ = null; - } - return reservationAffinityBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.GceClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GceClusterConfig) - private static final com.google.cloud.dataproc.v1beta2.GceClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.GceClusterConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GceClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfigOrBuilder.java deleted file mode 100644 index 1c431378..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GceClusterConfigOrBuilder.java +++ /dev/null @@ -1,460 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface GceClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 [Dataproc service
-   * account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_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_cloud_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.v1beta2.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.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reservationAffinity. - */ - com.google.cloud.dataproc.v1beta2.ReservationAffinity getReservationAffinity(); - /** - * - * - *
-   * Optional. Reservation Affinity for consuming Zonal reservation.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ReservationAffinity reservation_affinity = 11 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder getReservationAffinityOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequest.java deleted file mode 100644 index 370d3849..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequest.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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to fetch an autoscaling policy.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest} - */ -public final class GetAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_GetAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetAutoscalingPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index c9158e47..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface GetAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequest.java deleted file mode 100644 index 17ac01fd..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequest.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Request to get the resource representation for a cluster in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GetClusterRequest} - */ -public final class GetClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetClusterRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterName_); - } - if (!getRegionBytes().isEmpty()) { - 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.v1beta2.GetClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GetClusterRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GetClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GetClusterRequest) - com.google.cloud.dataproc.v1beta2.GetClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetClusterRequest.class, - com.google.cloud.dataproc.v1beta2.GetClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GetClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GetClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetClusterRequest build() { - com.google.cloud.dataproc.v1beta2.GetClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetClusterRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.GetClusterRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.GetClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.GetClusterRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GetClusterRequest) - private static final com.google.cloud.dataproc.v1beta2.GetClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.GetClusterRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetClusterRequestOrBuilder.java deleted file mode 100644 index 3fef2a79..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface GetClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequest.java deleted file mode 100644 index 80877273..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequest.java +++ /dev/null @@ -1,1000 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to get the resource representation for a job in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GetJobRequest} - */ -public final class GetJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetJobRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (!getRegionBytes().isEmpty()) { - 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.v1beta2.GetJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GetJobRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GetJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GetJobRequest) - com.google.cloud.dataproc.v1beta2.GetJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetJobRequest.class, - com.google.cloud.dataproc.v1beta2.GetJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GetJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetJobRequest build() { - com.google.cloud.dataproc.v1beta2.GetJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetJobRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.GetJobRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.GetJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.GetJobRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GetJobRequest) - private static final com.google.cloud.dataproc.v1beta2.GetJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.GetJobRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetJobRequestOrBuilder.java deleted file mode 100644 index 09dd9cff..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface GetJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequest.java deleted file mode 100644 index c13e7abc..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequest.java +++ /dev/null @@ -1,801 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to fetch a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest} - */ -public final class GetWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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 (!getNameBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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.v1beta2.GetWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.GetWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest) - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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.v1beta2.GetWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.GetWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GetWorkflowTemplateRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GetWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 35d5e25b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface GetWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @return The version. - */ - int getVersion(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfig.java deleted file mode 100644 index a1536c09..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfig.java +++ /dev/null @@ -1,1708 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The GKE config for this cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GkeClusterConfig} - */ -public final class GkeClusterConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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() {} - - @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(); - } - 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .Builder - subBuilder = null; - if (namespacedGkeDeploymentTarget_ != null) { - subBuilder = namespacedGkeDeploymentTarget_.toBuilder(); - } - namespacedGkeDeploymentTarget_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig - .NamespacedGkeDeploymentTarget.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(namespacedGkeDeploymentTarget_); - namespacedGkeDeploymentTarget_ = 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.class, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder.class); - } - - public interface NamespacedGkeDeploymentTargetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. The target GKE cluster to deploy to.
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The targetGkeCluster. - */ - java.lang.String getTargetGkeCluster(); - /** - * - * - *
-     * Optional. The target GKE cluster to deploy to.
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for targetGkeCluster. - */ - com.google.protobuf.ByteString getTargetGkeClusterBytes(); - - /** - * - * - *
-     * Optional. A namespace within the GKE cluster to deploy into.
-     * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterNamespace. - */ - java.lang.String getClusterNamespace(); - /** - * - * - *
-     * Optional. A namespace within the GKE cluster to deploy into.
-     * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterNamespace. - */ - com.google.protobuf.ByteString getClusterNamespaceBytes(); - } - /** - * - * - *
-   * A full, namespace-isolated deployment target for an existing GKE cluster.
-   * 
- * - * Protobuf type {@code - * google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget} - */ - public static final class NamespacedGkeDeploymentTarget - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - NamespacedGkeDeploymentTargetOrBuilder { - private static final long serialVersionUID = 0L; - // Use NamespacedGkeDeploymentTarget.newBuilder() to construct. - private NamespacedGkeDeploymentTarget( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NamespacedGkeDeploymentTarget() { - targetGkeCluster_ = ""; - clusterNamespace_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NamespacedGkeDeploymentTarget(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private NamespacedGkeDeploymentTarget( - 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(); - - targetGkeCluster_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - clusterNamespace_ = 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .class, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .Builder.class); - } - - public static final int TARGET_GKE_CLUSTER_FIELD_NUMBER = 1; - private volatile java.lang.Object targetGkeCluster_; - /** - * - * - *
-     * Optional. The target GKE cluster to deploy to.
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The targetGkeCluster. - */ - @java.lang.Override - public java.lang.String getTargetGkeCluster() { - java.lang.Object ref = targetGkeCluster_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetGkeCluster_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. The target GKE cluster to deploy to.
-     * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-     * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for targetGkeCluster. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetGkeClusterBytes() { - java.lang.Object ref = targetGkeCluster_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetGkeCluster_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CLUSTER_NAMESPACE_FIELD_NUMBER = 2; - private volatile java.lang.Object clusterNamespace_; - /** - * - * - *
-     * Optional. A namespace within the GKE cluster to deploy into.
-     * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterNamespace. - */ - @java.lang.Override - public java.lang.String getClusterNamespace() { - java.lang.Object ref = clusterNamespace_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterNamespace_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. A namespace within the GKE cluster to deploy into.
-     * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterNamespace. - */ - @java.lang.Override - public com.google.protobuf.ByteString getClusterNamespaceBytes() { - java.lang.Object ref = clusterNamespace_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterNamespace_ = 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 (!getTargetGkeClusterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, targetGkeCluster_); - } - if (!getClusterNamespaceBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterNamespace_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTargetGkeClusterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, targetGkeCluster_); - } - if (!getClusterNamespaceBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterNamespace_); - } - 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget other = - (com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) obj; - - if (!getTargetGkeCluster().equals(other.getTargetGkeCluster())) return false; - if (!getClusterNamespace().equals(other.getClusterNamespace())) 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) + TARGET_GKE_CLUSTER_FIELD_NUMBER; - hash = (53 * hash) + getTargetGkeCluster().hashCode(); - hash = (37 * hash) + CLUSTER_NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getClusterNamespace().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom( - 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom( - java.io.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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseDelimitedFrom( - java.io.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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 full, namespace-isolated deployment target for an existing GKE cluster.
-     * 
- * - * Protobuf type {@code - * google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTargetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .class, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .Builder.class); - } - - // Construct using - // com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget.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(); - targetGkeCluster_ = ""; - - clusterNamespace_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_NamespacedGkeDeploymentTarget_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - build() { - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - buildPartial() { - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget result = - new com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget( - this); - result.targetGkeCluster_ = targetGkeCluster_; - result.clusterNamespace_ = clusterNamespace_; - 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) { - return mergeFrom( - (com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget other) { - if (other - == com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .getDefaultInstance()) return this; - if (!other.getTargetGkeCluster().isEmpty()) { - targetGkeCluster_ = other.targetGkeCluster_; - onChanged(); - } - if (!other.getClusterNamespace().isEmpty()) { - clusterNamespace_ = other.clusterNamespace_; - 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object targetGkeCluster_ = ""; - /** - * - * - *
-       * Optional. The target GKE cluster to deploy to.
-       * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-       * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The targetGkeCluster. - */ - public java.lang.String getTargetGkeCluster() { - java.lang.Object ref = targetGkeCluster_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetGkeCluster_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. The target GKE cluster to deploy to.
-       * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-       * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for targetGkeCluster. - */ - public com.google.protobuf.ByteString getTargetGkeClusterBytes() { - java.lang.Object ref = targetGkeCluster_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetGkeCluster_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. The target GKE cluster to deploy to.
-       * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-       * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The targetGkeCluster to set. - * @return This builder for chaining. - */ - public Builder setTargetGkeCluster(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetGkeCluster_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The target GKE cluster to deploy to.
-       * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-       * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearTargetGkeCluster() { - - targetGkeCluster_ = getDefaultInstance().getTargetGkeCluster(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The target GKE cluster to deploy to.
-       * Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}'
-       * 
- * - * - * string target_gke_cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for targetGkeCluster to set. - * @return This builder for chaining. - */ - public Builder setTargetGkeClusterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetGkeCluster_ = value; - onChanged(); - return this; - } - - private java.lang.Object clusterNamespace_ = ""; - /** - * - * - *
-       * Optional. A namespace within the GKE cluster to deploy into.
-       * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The clusterNamespace. - */ - public java.lang.String getClusterNamespace() { - java.lang.Object ref = clusterNamespace_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - clusterNamespace_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. A namespace within the GKE cluster to deploy into.
-       * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for clusterNamespace. - */ - public com.google.protobuf.ByteString getClusterNamespaceBytes() { - java.lang.Object ref = clusterNamespace_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - clusterNamespace_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. A namespace within the GKE cluster to deploy into.
-       * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The clusterNamespace to set. - * @return This builder for chaining. - */ - public Builder setClusterNamespace(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - clusterNamespace_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A namespace within the GKE cluster to deploy into.
-       * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearClusterNamespace() { - - clusterNamespace_ = getDefaultInstance().getClusterNamespace(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A namespace within the GKE cluster to deploy into.
-       * 
- * - * string cluster_namespace = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for clusterNamespace to set. - * @return This builder for chaining. - */ - public Builder setClusterNamespaceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - clusterNamespace_ = 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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget) - private static final com.google.cloud.dataproc.v1beta2.GkeClusterConfig - .NamespacedGkeDeploymentTarget - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget(); - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NamespacedGkeDeploymentTarget parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NamespacedGkeDeploymentTarget(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.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int NAMESPACED_GKE_DEPLOYMENT_TARGET_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - namespacedGkeDeploymentTarget_; - /** - * - * - *
-   * Optional. A target for the deployment.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the namespacedGkeDeploymentTarget field is set. - */ - @java.lang.Override - public boolean hasNamespacedGkeDeploymentTarget() { - return namespacedGkeDeploymentTarget_ != null; - } - /** - * - * - *
-   * Optional. A target for the deployment.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The namespacedGkeDeploymentTarget. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - getNamespacedGkeDeploymentTarget() { - return namespacedGkeDeploymentTarget_ == null - ? com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .getDefaultInstance() - : namespacedGkeDeploymentTarget_; - } - /** - * - * - *
-   * Optional. A target for the deployment.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTargetOrBuilder - getNamespacedGkeDeploymentTargetOrBuilder() { - return getNamespacedGkeDeploymentTarget(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (namespacedGkeDeploymentTarget_ != null) { - output.writeMessage(1, getNamespacedGkeDeploymentTarget()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (namespacedGkeDeploymentTarget_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, getNamespacedGkeDeploymentTarget()); - } - 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.v1beta2.GkeClusterConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.GkeClusterConfig other = - (com.google.cloud.dataproc.v1beta2.GkeClusterConfig) obj; - - if (hasNamespacedGkeDeploymentTarget() != other.hasNamespacedGkeDeploymentTarget()) - return false; - if (hasNamespacedGkeDeploymentTarget()) { - if (!getNamespacedGkeDeploymentTarget().equals(other.getNamespacedGkeDeploymentTarget())) - 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 (hasNamespacedGkeDeploymentTarget()) { - hash = (37 * hash) + NAMESPACED_GKE_DEPLOYMENT_TARGET_FIELD_NUMBER; - hash = (53 * hash) + getNamespacedGkeDeploymentTarget().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.GkeClusterConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GkeClusterConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GkeClusterConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GkeClusterConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GkeClusterConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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 GKE config for this cluster.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.GkeClusterConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.GkeClusterConfig) - com.google.cloud.dataproc.v1beta2.GkeClusterConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.class, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (namespacedGkeDeploymentTargetBuilder_ == null) { - namespacedGkeDeploymentTarget_ = null; - } else { - namespacedGkeDeploymentTarget_ = null; - namespacedGkeDeploymentTargetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_GkeClusterConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.GkeClusterConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig build() { - com.google.cloud.dataproc.v1beta2.GkeClusterConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.GkeClusterConfig result = - new com.google.cloud.dataproc.v1beta2.GkeClusterConfig(this); - if (namespacedGkeDeploymentTargetBuilder_ == null) { - result.namespacedGkeDeploymentTarget_ = namespacedGkeDeploymentTarget_; - } else { - result.namespacedGkeDeploymentTarget_ = namespacedGkeDeploymentTargetBuilder_.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.v1beta2.GkeClusterConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.GkeClusterConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.GkeClusterConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.GkeClusterConfig.getDefaultInstance()) - return this; - if (other.hasNamespacedGkeDeploymentTarget()) { - mergeNamespacedGkeDeploymentTarget(other.getNamespacedGkeDeploymentTarget()); - } - 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.v1beta2.GkeClusterConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.GkeClusterConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - namespacedGkeDeploymentTarget_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .Builder, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig - .NamespacedGkeDeploymentTargetOrBuilder> - namespacedGkeDeploymentTargetBuilder_; - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the namespacedGkeDeploymentTarget field is set. - */ - public boolean hasNamespacedGkeDeploymentTarget() { - return namespacedGkeDeploymentTargetBuilder_ != null - || namespacedGkeDeploymentTarget_ != null; - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The namespacedGkeDeploymentTarget. - */ - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - getNamespacedGkeDeploymentTarget() { - if (namespacedGkeDeploymentTargetBuilder_ == null) { - return namespacedGkeDeploymentTarget_ == null - ? com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .getDefaultInstance() - : namespacedGkeDeploymentTarget_; - } else { - return namespacedGkeDeploymentTargetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNamespacedGkeDeploymentTarget( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget value) { - if (namespacedGkeDeploymentTargetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - namespacedGkeDeploymentTarget_ = value; - onChanged(); - } else { - namespacedGkeDeploymentTargetBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setNamespacedGkeDeploymentTarget( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget.Builder - builderForValue) { - if (namespacedGkeDeploymentTargetBuilder_ == null) { - namespacedGkeDeploymentTarget_ = builderForValue.build(); - onChanged(); - } else { - namespacedGkeDeploymentTargetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeNamespacedGkeDeploymentTarget( - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget value) { - if (namespacedGkeDeploymentTargetBuilder_ == null) { - if (namespacedGkeDeploymentTarget_ != null) { - namespacedGkeDeploymentTarget_ = - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .newBuilder(namespacedGkeDeploymentTarget_) - .mergeFrom(value) - .buildPartial(); - } else { - namespacedGkeDeploymentTarget_ = value; - } - onChanged(); - } else { - namespacedGkeDeploymentTargetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearNamespacedGkeDeploymentTarget() { - if (namespacedGkeDeploymentTargetBuilder_ == null) { - namespacedGkeDeploymentTarget_ = null; - onChanged(); - } else { - namespacedGkeDeploymentTarget_ = null; - namespacedGkeDeploymentTargetBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget.Builder - getNamespacedGkeDeploymentTargetBuilder() { - - onChanged(); - return getNamespacedGkeDeploymentTargetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTargetOrBuilder - getNamespacedGkeDeploymentTargetOrBuilder() { - if (namespacedGkeDeploymentTargetBuilder_ != null) { - return namespacedGkeDeploymentTargetBuilder_.getMessageOrBuilder(); - } else { - return namespacedGkeDeploymentTarget_ == null - ? com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .getDefaultInstance() - : namespacedGkeDeploymentTarget_; - } - } - /** - * - * - *
-     * Optional. A target for the deployment.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .Builder, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig - .NamespacedGkeDeploymentTargetOrBuilder> - getNamespacedGkeDeploymentTargetFieldBuilder() { - if (namespacedGkeDeploymentTargetBuilder_ == null) { - namespacedGkeDeploymentTargetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - .Builder, - com.google.cloud.dataproc.v1beta2.GkeClusterConfig - .NamespacedGkeDeploymentTargetOrBuilder>( - getNamespacedGkeDeploymentTarget(), getParentForChildren(), isClean()); - namespacedGkeDeploymentTarget_ = null; - } - return namespacedGkeDeploymentTargetBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.GkeClusterConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.GkeClusterConfig) - private static final com.google.cloud.dataproc.v1beta2.GkeClusterConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.GkeClusterConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.GkeClusterConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfigOrBuilder.java deleted file mode 100644 index 231d5731..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/GkeClusterConfigOrBuilder.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface GkeClusterConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.GkeClusterConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A target for the deployment.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the namespacedGkeDeploymentTarget field is set. - */ - boolean hasNamespacedGkeDeploymentTarget(); - /** - * - * - *
-   * Optional. A target for the deployment.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The namespacedGkeDeploymentTarget. - */ - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget - getNamespacedGkeDeploymentTarget(); - /** - * - * - *
-   * Optional. A target for the deployment.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.GkeClusterConfig.NamespacedGkeDeploymentTargetOrBuilder - getNamespacedGkeDeploymentTargetOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJob.java deleted file mode 100644 index a35bef61..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJob.java +++ /dev/null @@ -1,2871 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.HadoopJob} - */ -public final class HadoopJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_HadoopJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.HadoopJob.class, - com.google.cloud.dataproc.v1beta2.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 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 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.HadoopJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.HadoopJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.HadoopJob) - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_HadoopJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.HadoopJob.class, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_HadoopJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob build() { - com.google.cloud.dataproc.v1beta2.HadoopJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob buildPartial() { - com.google.cloud.dataproc.v1beta2.HadoopJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.HadoopJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.HadoopJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 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 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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.HadoopJob) - private static final com.google.cloud.dataproc.v1beta2.HadoopJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.HadoopJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJobOrBuilder.java deleted file mode 100644 index 2c018b8a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HadoopJobOrBuilder.java +++ /dev/null @@ -1,438 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface HadoopJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 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 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.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.HadoopJob.DriverCase getDriverCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJob.java deleted file mode 100644 index 789ac87a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJob.java +++ /dev/null @@ -1,2153 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc job for running [Apache Hive](https://hive.apache.org/)
- * queries on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.HiveJob} - */ -public final class HiveJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_HiveJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.HiveJob.class, - com.google.cloud.dataproc.v1beta2.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 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.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.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.v1beta2.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.v1beta2.HiveJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.HiveJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.HiveJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.HiveJob) - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_HiveJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.HiveJob.class, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_HiveJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob build() { - com.google.cloud.dataproc.v1beta2.HiveJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob buildPartial() { - com.google.cloud.dataproc.v1beta2.HiveJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.HiveJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.HiveJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 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.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList( - com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1beta2.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1beta2.QueryList.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1beta2.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.HiveJob) - private static final com.google.cloud.dataproc.v1beta2.HiveJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.HiveJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJobOrBuilder.java deleted file mode 100644 index 29ed744c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/HiveJobOrBuilder.java +++ /dev/null @@ -1,299 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface HiveJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.HiveJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.v1beta2.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1beta2.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfig.java deleted file mode 100644 index d5cee3bf..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfig.java +++ /dev/null @@ -1,827 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Configuration for the size bounds of an instance group, including its
- * proportional size to other groups.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig} - */ -public final class InstanceGroupAutoscalingPolicyConfig - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.class, - com.google.cloud.dataproc.v1beta2.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_; - /** - * - * - *
-   * Optional. 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, ). Required.
-   * Secondary workers - Bounds: [min_instances, ). Default: 0.
-   * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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.v1beta2.InstanceGroupAutoscalingPolicyConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig) - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.class, - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig.Builder.class); - } - - // Construct using - // com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupAutoscalingPolicyConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig build() { - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig) { - return mergeFrom( - (com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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_; - /** - * - * - *
-     * Optional. 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, ). Required.
-     * Secondary workers - Bounds: [min_instances, ). Default: 0.
-     * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxInstances. - */ - @java.lang.Override - public int getMaxInstances() { - return maxInstances_; - } - /** - * - * - *
-     * Optional. 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, ). Required.
-     * Secondary workers - Bounds: [min_instances, ). Default: 0.
-     * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The maxInstances to set. - * @return This builder for chaining. - */ - public Builder setMaxInstances(int value) { - - maxInstances_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. 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, ). Required.
-     * Secondary workers - Bounds: [min_instances, ). Default: 0.
-     * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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.v1beta2.InstanceGroupAutoscalingPolicyConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig) - private static final com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.InstanceGroupAutoscalingPolicyConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupAutoscalingPolicyConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupAutoscalingPolicyConfigOrBuilder.java deleted file mode 100644 index da8490b3..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface InstanceGroupAutoscalingPolicyConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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(); - - /** - * - * - *
-   * Optional. 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, ). Required.
-   * Secondary workers - Bounds: [min_instances, ). Default: 0.
-   * 
- * - * int32 max_instances = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfig.java deleted file mode 100644 index c28ec8fe..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfig.java +++ /dev/null @@ -1,2836 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The config settings for Compute Engine resources in
- * an instance group, such as a master or worker group.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.InstanceGroupConfig} - */ -public final class InstanceGroupConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - 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.v1beta2.DiskConfig.Builder subBuilder = null; - if (diskConfig_ != null) { - subBuilder = diskConfig_.toBuilder(); - } - diskConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig.Builder subBuilder = null; - if (managedGroupConfig_ != null) { - subBuilder = managedGroupConfig_.toBuilder(); - } - managedGroupConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig.parser(), - extensionRegistry)); - break; - } - case 74: - { - 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)) { - 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.class, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder.class); - } - - public static final int NUM_INSTANCES_FIELD_NUMBER = 1; - private int numInstances_; - /** - * - * - *
-   * Optional. The number of VM instances in the instance group.
-   * For master instance 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.v1beta2.DiskConfig diskConfig_; - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The diskConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.DiskConfig getDiskConfig() { - return diskConfig_ == null - ? com.google.cloud.dataproc.v1beta2.DiskConfig.getDefaultInstance() - : diskConfig_; - } - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 MANAGED_GROUP_CONFIG_FIELD_NUMBER = 7; - private com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The managedGroupConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedGroupConfig getManagedGroupConfig() { - return managedGroupConfig_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig getAccelerators(int index) { - return accelerators_.get(index); - } - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder( - int index) { - return accelerators_.get(index); - } - - public static final int MIN_CPU_PLATFORM_FIELD_NUMBER = 9; - private volatile java.lang.Object minCpuPlatform_; - /** - * - * - *
-   * 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; - * - * @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; - } - } - /** - * - * - *
-   * 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; - * - * @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 (!getImageUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_); - } - if (!getMachineTypeUriBytes().isEmpty()) { - 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 (!getMinCpuPlatformBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, minCpuPlatform_); - } - 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 (!getImageUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_); - } - if (!getMachineTypeUriBytes().isEmpty()) { - 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 (!getMinCpuPlatformBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, 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.v1beta2.InstanceGroupConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig other = - (com.google.cloud.dataproc.v1beta2.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 (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()); - 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.v1beta2.InstanceGroupConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.InstanceGroupConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.InstanceGroupConfig) - com.google.cloud.dataproc.v1beta2.InstanceGroupConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.class, - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - - 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_InstanceGroupConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.InstanceGroupConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig build() { - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstanceGroupConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.InstanceGroupConfig result = - new com.google.cloud.dataproc.v1beta2.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_; - 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.v1beta2.InstanceGroupConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.InstanceGroupConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.InstanceGroupConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.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.v1beta2.InstanceGroupConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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 master instance 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 master instance 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 master instance 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.v1beta2.DiskConfig diskConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.DiskConfig, - com.google.cloud.dataproc.v1beta2.DiskConfig.Builder, - com.google.cloud.dataproc.v1beta2.DiskConfigOrBuilder> - diskConfigBuilder_; - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The diskConfig. - */ - public com.google.cloud.dataproc.v1beta2.DiskConfig getDiskConfig() { - if (diskConfigBuilder_ == null) { - return diskConfig_ == null - ? com.google.cloud.dataproc.v1beta2.DiskConfig.getDefaultInstance() - : diskConfig_; - } else { - return diskConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDiskConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setDiskConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeDiskConfig(com.google.cloud.dataproc.v1beta2.DiskConfig value) { - if (diskConfigBuilder_ == null) { - if (diskConfig_ != null) { - diskConfig_ = - com.google.cloud.dataproc.v1beta2.DiskConfig.newBuilder(diskConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - diskConfig_ = value; - } - onChanged(); - } else { - diskConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.DiskConfig.Builder getDiskConfigBuilder() { - - onChanged(); - return getDiskConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.DiskConfigOrBuilder getDiskConfigOrBuilder() { - if (diskConfigBuilder_ != null) { - return diskConfigBuilder_.getMessageOrBuilder(); - } else { - return diskConfig_ == null - ? com.google.cloud.dataproc.v1beta2.DiskConfig.getDefaultInstance() - : diskConfig_; - } - } - /** - * - * - *
-     * Optional. Disk option config settings.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.DiskConfig, - com.google.cloud.dataproc.v1beta2.DiskConfig.Builder, - com.google.cloud.dataproc.v1beta2.DiskConfigOrBuilder> - getDiskConfigFieldBuilder() { - if (diskConfigBuilder_ == null) { - diskConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.DiskConfig, - com.google.cloud.dataproc.v1beta2.DiskConfig.Builder, - com.google.cloud.dataproc.v1beta2.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 com.google.cloud.dataproc.v1beta2.ManagedGroupConfig managedGroupConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig, - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The managedGroupConfig. - */ - public com.google.cloud.dataproc.v1beta2.ManagedGroupConfig getManagedGroupConfig() { - if (managedGroupConfigBuilder_ == null) { - return managedGroupConfig_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setManagedGroupConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setManagedGroupConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeManagedGroupConfig( - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig value) { - if (managedGroupConfigBuilder_ == null) { - if (managedGroupConfig_ != null) { - managedGroupConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ManagedGroupConfigOrBuilder - getManagedGroupConfigOrBuilder() { - if (managedGroupConfigBuilder_ != null) { - return managedGroupConfigBuilder_.getMessageOrBuilder(); - } else { - return managedGroupConfig_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig, - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.ManagedGroupConfigOrBuilder> - getManagedGroupConfigFieldBuilder() { - if (managedGroupConfigBuilder_ == null) { - managedGroupConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig, - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig, - com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder, - com.google.cloud.dataproc.v1beta2.AcceleratorConfigOrBuilder> - acceleratorsBuilder_; - - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAccelerators( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAccelerators( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators(com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAccelerators( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder getAcceleratorsBuilder( - int index) { - return getAcceleratorsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder addAcceleratorsBuilder() { - return getAcceleratorsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.AcceleratorConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder addAcceleratorsBuilder( - int index) { - return getAcceleratorsFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1beta2.AcceleratorConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. The Compute Engine accelerator configuration for these
-     * instances.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig, - com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder, - com.google.cloud.dataproc.v1beta2.AcceleratorConfigOrBuilder> - getAcceleratorsFieldBuilder() { - if (acceleratorsBuilder_ == null) { - acceleratorsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AcceleratorConfig, - com.google.cloud.dataproc.v1beta2.AcceleratorConfig.Builder, - com.google.cloud.dataproc.v1beta2.AcceleratorConfigOrBuilder>( - accelerators_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - accelerators_ = null; - } - return acceleratorsBuilder_; - } - - private java.lang.Object minCpuPlatform_ = ""; - /** - * - * - *
-     * 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; - * - * @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; - } - } - /** - * - * - *
-     * 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; - * - * @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; - } - } - /** - * - * - *
-     * 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; - * - * @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; - } - /** - * - * - *
-     * 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; - * - * @return This builder for chaining. - */ - public Builder clearMinCpuPlatform() { - - minCpuPlatform_ = getDefaultInstance().getMinCpuPlatform(); - onChanged(); - return this; - } - /** - * - * - *
-     * 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; - * - * @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.v1beta2.InstanceGroupConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.InstanceGroupConfig) - private static final com.google.cloud.dataproc.v1beta2.InstanceGroupConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.InstanceGroupConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstanceGroupConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfigOrBuilder.java deleted file mode 100644 index ae533db6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstanceGroupConfigOrBuilder.java +++ /dev/null @@ -1,382 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface InstanceGroupConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.InstanceGroupConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The number of VM instances in the instance group.
-   * For master instance 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.v1beta2.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.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The diskConfig. - */ - com.google.cloud.dataproc.v1beta2.DiskConfig getDiskConfig(); - /** - * - * - *
-   * Optional. Disk option config settings.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.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(); - - /** - * - * - *
-   * 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.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The managedGroupConfig. - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.ManagedGroupConfigOrBuilder getManagedGroupConfigOrBuilder(); - - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.AcceleratorConfig getAccelerators(int index); - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getAcceleratorsCount(); - /** - * - * - *
-   * Optional. The Compute Engine accelerator configuration for these
-   * instances.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(int index); - - /** - * - * - *
-   * 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; - * - * @return The minCpuPlatform. - */ - java.lang.String getMinCpuPlatform(); - /** - * - * - *
-   * 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; - * - * @return The bytes for minCpuPlatform. - */ - com.google.protobuf.ByteString getMinCpuPlatformBytes(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequest.java deleted file mode 100644 index a87398be..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequest.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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to instantiate an inline workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest} - */ -public final class InstantiateInlineWorkflowTemplateRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - instanceId_ = ""; - 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.v1beta2.WorkflowTemplate.Builder subBuilder = null; - if (template_ != null) { - subBuilder = template_.toBuilder(); - } - template_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(template_); - template_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceId_ = 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template_; - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate() { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - return getTemplate(); - } - - public static final int INSTANCE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object instanceId_; - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3; - * - * @return The instanceId. - */ - @java.lang.Override - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } - } - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3; - * - * @return The bytes for instanceId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int REQUEST_ID_FIELD_NUMBER = 4; - 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 = 4; - * - * @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 = 4; - * - * @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 (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (template_ != null) { - output.writeMessage(2, getTemplate()); - } - if (!getInstanceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceId_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (template_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTemplate()); - } - if (!getInstanceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceId_); - } - if (!getRequestIdBytes().isEmpty()) { - 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.v1beta2.InstantiateInlineWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1beta2.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 (!getInstanceId().equals(other.getInstanceId())) 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) + INSTANCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getInstanceId().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.v1beta2.InstantiateInlineWorkflowTemplateRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest) - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest.Builder - .class); - } - - // Construct using - // com.google.cloud.dataproc.v1beta2.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; - } - instanceId_ = ""; - - requestId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest - buildPartial() { - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest(this); - result.parent_ = parent_; - if (templateBuilder_ == null) { - result.template_ = template_; - } else { - result.template_ = templateBuilder_.build(); - } - result.instanceId_ = instanceId_; - 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.v1beta2.InstantiateInlineWorkflowTemplateRequest) { - return mergeFrom( - (com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasTemplate()) { - mergeTemplate(other.getTemplate()); - } - if (!other.getInstanceId().isEmpty()) { - instanceId_ = other.instanceId_; - 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.v1beta2.InstantiateInlineWorkflowTemplateRequest parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - templateBuilder_; - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate() { - if (templateBuilder_ == null) { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } else { - return templateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTemplate(com.google.cloud.dataproc.v1beta2.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (template_ != null) { - template_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder getTemplateBuilder() { - - onChanged(); - return getTemplateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - if (templateBuilder_ != null) { - return templateBuilder_.getMessageOrBuilder(); - } else { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } - } - /** - * - * - *
-     * Required. The workflow template to instantiate.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - getTemplateFieldBuilder() { - if (templateBuilder_ == null) { - templateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder>( - getTemplate(), getParentForChildren(), isClean()); - template_ = null; - } - return templateBuilder_; - } - - private java.lang.Object instanceId_ = ""; - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3; - * - * @return The instanceId. - */ - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3; - * - * @return The bytes for instanceId. - */ - public com.google.protobuf.ByteString getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3; - * - * @param value The instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearInstanceId() { - - instanceId_ = getDefaultInstance().getInstanceId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3; - * - * @param value The bytes for instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceId_ = value; - onChanged(); - return this; - } - - private 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 = 4; - * - * @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 = 4; - * - * @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 = 4; - * - * @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 = 4; - * - * @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 = 4; - * - * @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.v1beta2.InstantiateInlineWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.dataproc.v1beta2.InstantiateInlineWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateInlineWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index c93f5632..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateInlineWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,171 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface InstantiateInlineWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate(); - /** - * - * - *
-   * Required. The workflow template to instantiate.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder(); - - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3; - * - * @return The instanceId. - */ - java.lang.String getInstanceId(); - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3; - * - * @return The bytes for instanceId. - */ - com.google.protobuf.ByteString getInstanceIdBytes(); - - /** - * - * - *
-   * 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 = 4; - * - * @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 = 4; - * - * @return The bytes for requestId. - */ - com.google.protobuf.ByteString getRequestIdBytes(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequest.java deleted file mode 100644 index 3bd53060..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequest.java +++ /dev/null @@ -1,1566 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to instantiate a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest} - */ -public final class InstantiateWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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_ = ""; - instanceId_ = ""; - 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 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceId_ = s; - break; - } - case 34: - { - 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 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @return The version. - */ - @java.lang.Override - public int getVersion() { - return version_; - } - - public static final int INSTANCE_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object instanceId_; - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return The instanceId. - */ - @java.lang.Override - @java.lang.Deprecated - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } - } - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return The bytes for instanceId. - */ - @java.lang.Override - @java.lang.Deprecated - public com.google.protobuf.ByteString getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int 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; - * - * @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; - * - * @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 = 4; - - private static final class ParametersDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - @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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (version_ != 0) { - output.writeInt32(2, version_); - } - if (!getInstanceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceId_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParameters(), ParametersDefaultEntryHolder.defaultEntry, 4); - if (!getRequestIdBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (version_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, version_); - } - if (!getInstanceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceId_); - } - 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(4, parameters__); - } - if (!getRequestIdBytes().isEmpty()) { - 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.v1beta2.InstantiateWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (getVersion() != other.getVersion()) return false; - if (!getInstanceId().equals(other.getInstanceId())) 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) + INSTANCE_ID_FIELD_NUMBER; - hash = (53 * hash) + getInstanceId().hashCode(); - 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.v1beta2.InstantiateWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateWorkflowTemplateRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateWorkflowTemplateRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.InstantiateWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest) - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 4: - return internalGetParameters(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 4: - 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest.Builder.class); - } - - // Construct using - // com.google.cloud.dataproc.v1beta2.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; - - instanceId_ = ""; - - requestId_ = ""; - - internalGetMutableParameters().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.version_ = version_; - result.instanceId_ = instanceId_; - 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.v1beta2.InstantiateWorkflowTemplateRequest) { - return mergeFrom( - (com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.getVersion() != 0) { - setVersion(other.getVersion()); - } - if (!other.getInstanceId().isEmpty()) { - instanceId_ = other.instanceId_; - onChanged(); - } - 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.v1beta2.InstantiateWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @return This builder for chaining. - */ - public Builder clearVersion() { - - version_ = 0; - onChanged(); - return this; - } - - private java.lang.Object instanceId_ = ""; - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return The instanceId. - */ - @java.lang.Deprecated - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return The bytes for instanceId. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @param value The instanceId to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setInstanceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearInstanceId() { - - instanceId_ = getDefaultInstance().getInstanceId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Deprecated. Please use `request_id` field instead.
-     * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @param value The bytes for instanceId to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceId_ = value; - 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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - @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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - 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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - 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 100 characters.
-     * 
- * - * map<string, string> parameters = 4; - */ - 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.v1beta2.InstantiateWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.InstantiateWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.InstantiateWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index 06d7e3c7..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/InstantiateWorkflowTemplateRequestOrBuilder.java +++ /dev/null @@ -1,208 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface InstantiateWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @return The version. - */ - int getVersion(); - - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return The instanceId. - */ - @java.lang.Deprecated - java.lang.String getInstanceId(); - /** - * - * - *
-   * Deprecated. Please use `request_id` field instead.
-   * 
- * - * string instance_id = 3 [deprecated = true]; - * - * @return The bytes for instanceId. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getInstanceIdBytes(); - - /** - * - * - *
-   * 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; - * - * @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; - * - * @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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - int getParametersCount(); - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - 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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - java.util.Map getParametersMap(); - /** - * - * - *
-   * Optional. Map from parameter names to values that should be used for those
-   * parameters. Values may not exceed 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - 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 100 characters.
-   * 
- * - * map<string, string> parameters = 4; - */ - java.lang.String getParametersOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Job.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Job.java deleted file mode 100644 index aeaa2acb..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/Job.java +++ /dev/null @@ -1,6842 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc job resource.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.Job} - */ -public final class Job extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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(); - submittedBy_ = ""; - 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.v1beta2.JobReference.Builder subBuilder = null; - if (reference_ != null) { - subBuilder = reference_.toBuilder(); - } - reference_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.JobReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reference_); - reference_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.dataproc.v1beta2.JobPlacement.Builder subBuilder = null; - if (placement_ != null) { - subBuilder = placement_.toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.JobPlacement.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(placement_); - placement_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder subBuilder = null; - if (typeJobCase_ == 3) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.HadoopJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 3; - break; - } - case 34: - { - com.google.cloud.dataproc.v1beta2.SparkJob.Builder subBuilder = null; - if (typeJobCase_ == 4) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 4; - break; - } - case 42: - { - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder subBuilder = null; - if (typeJobCase_ == 5) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.PySparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 5; - break; - } - case 50: - { - com.google.cloud.dataproc.v1beta2.HiveJob.Builder subBuilder = null; - if (typeJobCase_ == 6) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.HiveJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 6; - break; - } - case 58: - { - com.google.cloud.dataproc.v1beta2.PigJob.Builder subBuilder = null; - if (typeJobCase_ == 7) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.PigJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.PigJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.PigJob) typeJob_); - typeJob_ = subBuilder.buildPartial(); - } - typeJobCase_ = 7; - break; - } - case 66: - { - com.google.cloud.dataproc.v1beta2.JobStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication.parser(), - extensionRegistry)); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - submittedBy_ = s; - break; - } - case 98: - { - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder subBuilder = null; - if (typeJobCase_ == 12) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SparkSqlJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobScheduling.Builder subBuilder = null; - if (scheduling_ != null) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.JobScheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scheduling_); - scheduling_ = subBuilder.buildPartial(); - } - - break; - } - case 170: - { - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder subBuilder = null; - if (typeJobCase_ == 21) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.SparkRJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SparkRJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob.Builder subBuilder = null; - if (typeJobCase_ == 23) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.PrestoJob) typeJob_).toBuilder(); - } - typeJob_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.PrestoJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_Job_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.Job.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reference. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobReference getReference() { - return reference_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobReferenceOrBuilder getReferenceOrBuilder() { - return getReference(); - } - - public static final int PLACEMENT_FIELD_NUMBER = 2; - private com.google.cloud.dataproc.v1beta2.JobPlacement placement_; - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobPlacement getPlacement() { - return placement_ == null - ? com.google.cloud.dataproc.v1beta2.JobPlacement.getDefaultInstance() - : placement_; - } - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder getPlacementOrBuilder() { - return getPlacement(); - } - - public static final int HADOOP_JOB_FIELD_NUMBER = 3; - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob() { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - - public static final int SPARK_JOB_FIELD_NUMBER = 4; - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob() { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder() { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - - public static final int PYSPARK_JOB_FIELD_NUMBER = 5; - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob() { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - - public static final int HIVE_JOB_FIELD_NUMBER = 6; - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob() { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder() { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - - public static final int PIG_JOB_FIELD_NUMBER = 7; - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob getPigJob() { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder() { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - - public static final int SPARK_R_JOB_FIELD_NUMBER = 21; - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob getSparkRJob() { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - - public static final int SPARK_SQL_JOB_FIELD_NUMBER = 12; - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob() { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - - public static final int PRESTO_JOB_FIELD_NUMBER = 23; - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob getPrestoJob() { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - - public static final int STATUS_FIELD_NUMBER = 8; - private com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus getStatus() { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus getStatusHistory(int index) { - return statusHistory_.get(index); - } - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.YarnApplicationOrBuilder getYarnApplicationsOrBuilder( - int index) { - return yarnApplications_.get(index); - } - - public static final int SUBMITTED_BY_FIELD_NUMBER = 10; - private volatile java.lang.Object submittedBy_; - /** - * - * - *
-   * Output only. The email address of the user submitting the job. For jobs
-   * submitted on the cluster, the address is <code>username@hostname</code>.
-   * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The submittedBy. - */ - @java.lang.Override - public java.lang.String getSubmittedBy() { - java.lang.Object ref = submittedBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - submittedBy_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The email address of the user submitting the job. For jobs
-   * submitted on the cluster, the address is <code>username@hostname</code>.
-   * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for submittedBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSubmittedByBytes() { - java.lang.Object ref = submittedBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - submittedBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobScheduling scheduling_; - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling() { - return scheduling_ == null - ? com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance() - : scheduling_; - } - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob) typeJob_); - } - if (typeJobCase_ == 4) { - output.writeMessage(4, (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_); - } - if (typeJobCase_ == 5) { - output.writeMessage(5, (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_); - } - if (typeJobCase_ == 6) { - output.writeMessage(6, (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_); - } - if (typeJobCase_ == 7) { - output.writeMessage(7, (com.google.cloud.dataproc.v1beta2.PigJob) typeJob_); - } - if (status_ != null) { - output.writeMessage(8, getStatus()); - } - for (int i = 0; i < yarnApplications_.size(); i++) { - output.writeMessage(9, yarnApplications_.get(i)); - } - if (!getSubmittedByBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, submittedBy_); - } - if (typeJobCase_ == 12) { - output.writeMessage(12, (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_); - } - for (int i = 0; i < statusHistory_.size(); i++) { - output.writeMessage(13, statusHistory_.get(i)); - } - if (!getDriverControlFilesUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, driverControlFilesUri_); - } - if (!getDriverOutputResourceUriBytes().isEmpty()) { - 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.v1beta2.SparkRJob) typeJob_); - } - if (!getJobUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 22, jobUuid_); - } - if (typeJobCase_ == 23) { - output.writeMessage(23, (com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob) typeJob_); - } - if (typeJobCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_); - } - if (typeJobCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_); - } - if (typeJobCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_); - } - if (typeJobCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.dataproc.v1beta2.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 (!getSubmittedByBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, submittedBy_); - } - if (typeJobCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_); - } - for (int i = 0; i < statusHistory_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, statusHistory_.get(i)); - } - if (!getDriverControlFilesUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, driverControlFilesUri_); - } - if (!getDriverOutputResourceUriBytes().isEmpty()) { - 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.v1beta2.SparkRJob) typeJob_); - } - if (!getJobUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, jobUuid_); - } - if (typeJobCase_ == 23) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 23, (com.google.cloud.dataproc.v1beta2.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.v1beta2.Job)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.Job other = (com.google.cloud.dataproc.v1beta2.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 (!getSubmittedBy().equals(other.getSubmittedBy())) 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) + SUBMITTED_BY_FIELD_NUMBER; - hash = (53 * hash) + getSubmittedBy().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.v1beta2.Job parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Job parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Job parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Job parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Job parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Job} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.Job) - com.google.cloud.dataproc.v1beta2.JobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_Job_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.Job.class, - com.google.cloud.dataproc.v1beta2.Job.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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(); - } - submittedBy_ = ""; - - 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_Job_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Job getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Job build() { - com.google.cloud.dataproc.v1beta2.Job result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Job buildPartial() { - com.google.cloud.dataproc.v1beta2.Job result = - new com.google.cloud.dataproc.v1beta2.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.submittedBy_ = submittedBy_; - 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.v1beta2.Job) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.Job) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.Job other) { - if (other == com.google.cloud.dataproc.v1beta2.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.getSubmittedBy().isEmpty()) { - submittedBy_ = other.submittedBy_; - onChanged(); - } - 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.v1beta2.Job parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobReference, - com.google.cloud.dataproc.v1beta2.JobReference.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reference. - */ - public com.google.cloud.dataproc.v1beta2.JobReference getReference() { - if (referenceBuilder_ == null) { - return reference_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReference(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setReference( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeReference(com.google.cloud.dataproc.v1beta2.JobReference value) { - if (referenceBuilder_ == null) { - if (reference_ != null) { - reference_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobReferenceOrBuilder getReferenceOrBuilder() { - if (referenceBuilder_ != null) { - return referenceBuilder_.getMessageOrBuilder(); - } else { - return reference_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobReference, - com.google.cloud.dataproc.v1beta2.JobReference.Builder, - com.google.cloud.dataproc.v1beta2.JobReferenceOrBuilder> - getReferenceFieldBuilder() { - if (referenceBuilder_ == null) { - referenceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobReference, - com.google.cloud.dataproc.v1beta2.JobReference.Builder, - com.google.cloud.dataproc.v1beta2.JobReferenceOrBuilder>( - getReference(), getParentForChildren(), isClean()); - reference_ = null; - } - return referenceBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.JobPlacement placement_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobPlacement, - com.google.cloud.dataproc.v1beta2.JobPlacement.Builder, - com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder> - placementBuilder_; - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - public com.google.cloud.dataproc.v1beta2.JobPlacement getPlacement() { - if (placementBuilder_ == null) { - return placement_ == null - ? com.google.cloud.dataproc.v1beta2.JobPlacement.getDefaultInstance() - : placement_; - } else { - return placementBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPlacement(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPlacement( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePlacement(com.google.cloud.dataproc.v1beta2.JobPlacement value) { - if (placementBuilder_ == null) { - if (placement_ != null) { - placement_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobPlacement.Builder getPlacementBuilder() { - - onChanged(); - return getPlacementFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder getPlacementOrBuilder() { - if (placementBuilder_ != null) { - return placementBuilder_.getMessageOrBuilder(); - } else { - return placement_ == null - ? com.google.cloud.dataproc.v1beta2.JobPlacement.getDefaultInstance() - : placement_; - } - } - /** - * - * - *
-     * Required. Job information, including how, when, and where to
-     * run the job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobPlacement, - com.google.cloud.dataproc.v1beta2.JobPlacement.Builder, - com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder> - getPlacementFieldBuilder() { - if (placementBuilder_ == null) { - placementBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobPlacement, - com.google.cloud.dataproc.v1beta2.JobPlacement.Builder, - com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder>( - getPlacement(), getParentForChildren(), isClean()); - placement_ = null; - } - return placementBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HadoopJob, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder, - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder> - hadoopJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob() { - if (hadoopJobBuilder_ == null) { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 3) { - return hadoopJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHadoopJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHadoopJob( - com.google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeHadoopJob(com.google.cloud.dataproc.v1beta2.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (typeJobCase_ == 3 - && typeJob_ != com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.HadoopJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.HadoopJob.Builder getHadoopJobBuilder() { - return getHadoopJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if ((typeJobCase_ == 3) && (hadoopJobBuilder_ != null)) { - return hadoopJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hadoop job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HadoopJob, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder, - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder> - getHadoopJobFieldBuilder() { - if (hadoopJobBuilder_ == null) { - if (!(typeJobCase_ == 3)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - hadoopJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HadoopJob, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder, - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.HadoopJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 3; - onChanged(); - ; - return hadoopJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkJob, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder> - sparkJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob() { - if (sparkJobBuilder_ == null) { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 4) { - return sparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkJob(com.google.cloud.dataproc.v1beta2.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (typeJobCase_ == 4 - && typeJob_ != com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.SparkJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SparkJob.Builder getSparkJobBuilder() { - return getSparkJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder() { - if ((typeJobCase_ == 4) && (sparkJobBuilder_ != null)) { - return sparkJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Spark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkJob, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder> - getSparkJobFieldBuilder() { - if (sparkJobBuilder_ == null) { - if (!(typeJobCase_ == 4)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - sparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkJob, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.SparkJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 4; - onChanged(); - ; - return sparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PySparkJob, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder, - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder> - pysparkJobBuilder_; - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob() { - if (pysparkJobBuilder_ == null) { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 5) { - return pysparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPysparkJob( - com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePysparkJob(com.google.cloud.dataproc.v1beta2.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (typeJobCase_ == 5 - && typeJob_ != com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.PySparkJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.PySparkJob.Builder getPysparkJobBuilder() { - return getPysparkJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if ((typeJobCase_ == 5) && (pysparkJobBuilder_ != null)) { - return pysparkJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a PySpark job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PySparkJob, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder, - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder> - getPysparkJobFieldBuilder() { - if (pysparkJobBuilder_ == null) { - if (!(typeJobCase_ == 5)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - pysparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PySparkJob, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder, - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.PySparkJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 5; - onChanged(); - ; - return pysparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HiveJob, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder, - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder> - hiveJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob() { - if (hiveJobBuilder_ == null) { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 6) { - return hiveJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHiveJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setHiveJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeHiveJob(com.google.cloud.dataproc.v1beta2.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (typeJobCase_ == 6 - && typeJob_ != com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.HiveJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.HiveJob.Builder getHiveJobBuilder() { - return getHiveJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder() { - if ((typeJobCase_ == 6) && (hiveJobBuilder_ != null)) { - return hiveJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Hive job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HiveJob, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder, - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder> - getHiveJobFieldBuilder() { - if (hiveJobBuilder_ == null) { - if (!(typeJobCase_ == 6)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - hiveJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HiveJob, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder, - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.HiveJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 6; - onChanged(); - ; - return hiveJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PigJob, - com.google.cloud.dataproc.v1beta2.PigJob.Builder, - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder> - pigJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob getPigJob() { - if (pigJobBuilder_ == null) { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 7) { - return pigJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPigJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPigJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePigJob(com.google.cloud.dataproc.v1beta2.PigJob value) { - if (pigJobBuilder_ == null) { - if (typeJobCase_ == 7 - && typeJob_ != com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.PigJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.PigJob.Builder getPigJobBuilder() { - return getPigJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder() { - if ((typeJobCase_ == 7) && (pigJobBuilder_ != null)) { - return pigJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.PigJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Pig job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PigJob, - com.google.cloud.dataproc.v1beta2.PigJob.Builder, - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder> - getPigJobFieldBuilder() { - if (pigJobBuilder_ == null) { - if (!(typeJobCase_ == 7)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - pigJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PigJob, - com.google.cloud.dataproc.v1beta2.PigJob.Builder, - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.PigJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 7; - onChanged(); - ; - return pigJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkRJob, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder> - sparkRJobBuilder_; - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob getSparkRJob() { - if (sparkRJobBuilder_ == null) { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 21) { - return sparkRJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkRJob( - com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkRJob(com.google.cloud.dataproc.v1beta2.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (typeJobCase_ == 21 - && typeJob_ != com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.SparkRJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SparkRJob.Builder getSparkRJobBuilder() { - return getSparkRJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if ((typeJobCase_ == 21) && (sparkRJobBuilder_ != null)) { - return sparkRJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 21) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkR job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkRJob, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder> - getSparkRJobFieldBuilder() { - if (sparkRJobBuilder_ == null) { - if (!(typeJobCase_ == 21)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - sparkRJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkRJob, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.SparkRJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 21; - onChanged(); - ; - return sparkRJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkSqlJob, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder> - sparkSqlJobBuilder_; - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob() { - if (sparkSqlJobBuilder_ == null) { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 12) { - return sparkSqlJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setSparkSqlJob( - com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeSparkSqlJob(com.google.cloud.dataproc.v1beta2.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (typeJobCase_ == 12 - && typeJob_ != com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.SparkSqlJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder getSparkSqlJobBuilder() { - return getSparkSqlJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if ((typeJobCase_ == 12) && (sparkSqlJobBuilder_ != null)) { - return sparkSqlJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a SparkSql job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkSqlJob, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder> - getSparkSqlJobFieldBuilder() { - if (sparkSqlJobBuilder_ == null) { - if (!(typeJobCase_ == 12)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - sparkSqlJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkSqlJob, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.SparkSqlJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 12; - onChanged(); - ; - return sparkSqlJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PrestoJob, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder, - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder> - prestoJobBuilder_; - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob getPrestoJob() { - if (prestoJobBuilder_ == null) { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } else { - if (typeJobCase_ == 23) { - return prestoJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrestoJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPrestoJob( - com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergePrestoJob(com.google.cloud.dataproc.v1beta2.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (typeJobCase_ == 23 - && typeJob_ != com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance()) { - typeJob_ = - com.google.cloud.dataproc.v1beta2.PrestoJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.PrestoJob.Builder getPrestoJobBuilder() { - return getPrestoJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if ((typeJobCase_ == 23) && (prestoJobBuilder_ != null)) { - return prestoJobBuilder_.getMessageOrBuilder(); - } else { - if (typeJobCase_ == 23) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) typeJob_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. Job is a Presto job.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PrestoJob, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder, - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder> - getPrestoJobFieldBuilder() { - if (prestoJobBuilder_ == null) { - if (!(typeJobCase_ == 23)) { - typeJob_ = com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - prestoJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PrestoJob, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder, - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.PrestoJob) typeJob_, - getParentForChildren(), - isClean()); - typeJob_ = null; - } - typeJobCase_ = 23; - onChanged(); - ; - return prestoJobBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.JobStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1beta2.JobStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1beta2.JobStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder> - statusHistoryBuilder_; - - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addStatusHistory( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobStatus.Builder getStatusHistoryBuilder(int index) { - return getStatusHistoryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobStatus.Builder addStatusHistoryBuilder() { - return getStatusHistoryFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.JobStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobStatus.Builder addStatusHistoryBuilder(int index) { - return getStatusHistoryFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1beta2.JobStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The previous job status.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder> - getStatusHistoryFieldBuilder() { - if (statusHistoryBuilder_ == null) { - statusHistoryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication, - com.google.cloud.dataproc.v1beta2.YarnApplication.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setYarnApplications( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setYarnApplications( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications(com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications( - com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addYarnApplications( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.YarnApplication.Builder addYarnApplicationsBuilder() { - return getYarnApplicationsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.YarnApplication.Builder addYarnApplicationsBuilder( - int index) { - return getYarnApplicationsFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.YarnApplication, - com.google.cloud.dataproc.v1beta2.YarnApplication.Builder, - com.google.cloud.dataproc.v1beta2.YarnApplicationOrBuilder> - getYarnApplicationsFieldBuilder() { - if (yarnApplicationsBuilder_ == null) { - yarnApplicationsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.YarnApplication, - com.google.cloud.dataproc.v1beta2.YarnApplication.Builder, - com.google.cloud.dataproc.v1beta2.YarnApplicationOrBuilder>( - yarnApplications_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - yarnApplications_ = null; - } - return yarnApplicationsBuilder_; - } - - private java.lang.Object submittedBy_ = ""; - /** - * - * - *
-     * Output only. The email address of the user submitting the job. For jobs
-     * submitted on the cluster, the address is <code>username@hostname</code>.
-     * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The submittedBy. - */ - public java.lang.String getSubmittedBy() { - java.lang.Object ref = submittedBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - submittedBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The email address of the user submitting the job. For jobs
-     * submitted on the cluster, the address is <code>username@hostname</code>.
-     * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for submittedBy. - */ - public com.google.protobuf.ByteString getSubmittedByBytes() { - java.lang.Object ref = submittedBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - submittedBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The email address of the user submitting the job. For jobs
-     * submitted on the cluster, the address is <code>username@hostname</code>.
-     * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The submittedBy to set. - * @return This builder for chaining. - */ - public Builder setSubmittedBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - submittedBy_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The email address of the user submitting the job. For jobs
-     * submitted on the cluster, the address is <code>username@hostname</code>.
-     * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearSubmittedBy() { - - submittedBy_ = getDefaultInstance().getSubmittedBy(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The email address of the user submitting the job. For jobs
-     * submitted on the cluster, the address is <code>username@hostname</code>.
-     * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for submittedBy to set. - * @return This builder for chaining. - */ - public Builder setSubmittedByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - submittedBy_ = value; - onChanged(); - return this; - } - - 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.v1beta2.JobScheduling scheduling_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobScheduling, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder, - com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder> - schedulingBuilder_; - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - public com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling() { - if (schedulingBuilder_ == null) { - return scheduling_ == null - ? com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance() - : scheduling_; - } else { - return schedulingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling( - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder builderForValue) { - if (schedulingBuilder_ == null) { - scheduling_ = builderForValue.build(); - onChanged(); - } else { - schedulingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeScheduling(com.google.cloud.dataproc.v1beta2.JobScheduling value) { - if (schedulingBuilder_ == null) { - if (scheduling_ != null) { - scheduling_ = - com.google.cloud.dataproc.v1beta2.JobScheduling.newBuilder(scheduling_) - .mergeFrom(value) - .buildPartial(); - } else { - scheduling_ = value; - } - onChanged(); - } else { - schedulingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobScheduling.Builder getSchedulingBuilder() { - - onChanged(); - return getSchedulingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder getSchedulingOrBuilder() { - if (schedulingBuilder_ != null) { - return schedulingBuilder_.getMessageOrBuilder(); - } else { - return scheduling_ == null - ? com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance() - : scheduling_; - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobScheduling, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder, - com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder> - getSchedulingFieldBuilder() { - if (schedulingBuilder_ == null) { - schedulingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobScheduling, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.Job) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.Job) - private static final com.google.cloud.dataproc.v1beta2.Job DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.Job(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.Job getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadata.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadata.java deleted file mode 100644 index 243e68f2..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadata.java +++ /dev/null @@ -1,1394 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Job Operation metadata.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.JobMetadata} - */ -public final class JobMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus.Builder subBuilder = null; - if (status_ != null) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobMetadata.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_; - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus getStatus() { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.JobStatus.getDefaultInstance() - : status_; - } - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobId_); - } - if (status_ != null) { - output.writeMessage(2, getStatus()); - } - if (!getOperationTypeBytes().isEmpty()) { - 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 (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobId_); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); - } - if (!getOperationTypeBytes().isEmpty()) { - 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.v1beta2.JobMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.JobMetadata other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.JobMetadata) - com.google.cloud.dataproc.v1beta2.JobMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobMetadata.class, - com.google.cloud.dataproc.v1beta2.JobMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.JobMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobMetadata build() { - com.google.cloud.dataproc.v1beta2.JobMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobMetadata buildPartial() { - com.google.cloud.dataproc.v1beta2.JobMetadata result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.JobMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.JobMetadata other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder> - statusBuilder_; - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - public com.google.cloud.dataproc.v1beta2.JobStatus getStatus() { - if (statusBuilder_ == null) { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.JobStatus.getDefaultInstance() - : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setStatus(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeStatus(com.google.cloud.dataproc.v1beta2.JobStatus value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobStatus.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null - ? com.google.cloud.dataproc.v1beta2.JobStatus.getDefaultInstance() - : status_; - } - } - /** - * - * - *
-     * Output only. Most recent job status.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobStatus, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.JobMetadata) - private static final com.google.cloud.dataproc.v1beta2.JobMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.JobMetadata(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobMetadataOrBuilder.java deleted file mode 100644 index f5183d06..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface JobMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1beta2.JobStatus getStatus(); - /** - * - * - *
-   * Output only. Most recent job status.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobStatus status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobOrBuilder.java deleted file mode 100644 index 302177cc..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobOrBuilder.java +++ /dev/null @@ -1,886 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface JobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The reference. - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference reference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.JobReferenceOrBuilder getReferenceOrBuilder(); - - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The placement. - */ - com.google.cloud.dataproc.v1beta2.JobPlacement getPlacement(); - /** - * - * - *
-   * Required. Job information, including how, when, and where to
-   * run the job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobPlacement placement = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder getPlacementOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hadoopJob. - */ - com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob(); - /** - * - * - *
-   * Optional. Job is a Hadoop job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkJob. - */ - com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob(); - /** - * - * - *
-   * Optional. Job is a Spark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pysparkJob. - */ - com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob(); - /** - * - * - *
-   * Optional. Job is a PySpark job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The hiveJob. - */ - com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob(); - /** - * - * - *
-   * Optional. Job is a Hive job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The pigJob. - */ - com.google.cloud.dataproc.v1beta2.PigJob getPigJob(); - /** - * - * - *
-   * Optional. Job is a Pig job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkRJob. - */ - com.google.cloud.dataproc.v1beta2.SparkRJob getSparkRJob(); - /** - * - * - *
-   * Optional. Job is a SparkR job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 21 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder getSparkRJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The sparkSqlJob. - */ - com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob(); - /** - * - * - *
-   * Optional. Job is a SparkSql job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 12 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder(); - - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The prestoJob. - */ - com.google.cloud.dataproc.v1beta2.PrestoJob getPrestoJob(); - /** - * - * - *
-   * Optional. Job is a Presto job.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 23 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The status. - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder getStatusOrBuilder(); - - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getStatusHistoryList(); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.JobStatus getStatusHistory(int index); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getStatusHistoryCount(); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getStatusHistoryOrBuilderList(); - /** - * - * - *
-   * Output only. The previous job status.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.JobStatus status_history = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YarnApplication yarn_applications = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.YarnApplicationOrBuilder getYarnApplicationsOrBuilder( - int index); - - /** - * - * - *
-   * Output only. The email address of the user submitting the job. For jobs
-   * submitted on the cluster, the address is <code>username@hostname</code>.
-   * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The submittedBy. - */ - java.lang.String getSubmittedBy(); - /** - * - * - *
-   * Output only. The email address of the user submitting the job. For jobs
-   * submitted on the cluster, the address is <code>username@hostname</code>.
-   * 
- * - * string submitted_by = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for submittedBy. - */ - com.google.protobuf.ByteString getSubmittedByBytes(); - - /** - * - * - *
-   * 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.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - boolean hasScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 20 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.Job.TypeJobCase getTypeJobCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacement.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacement.java deleted file mode 100644 index 41bfae5f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacement.java +++ /dev/null @@ -1,820 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Dataproc job config.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.JobPlacement} - */ -public final class JobPlacement extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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(); - } - 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; - } - 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobPlacement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobPlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobPlacement.class, - com.google.cloud.dataproc.v1beta2.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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterUuid_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterName_); - } - if (!getClusterUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterUuid_); - } - 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.v1beta2.JobPlacement)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.JobPlacement other = - (com.google.cloud.dataproc.v1beta2.JobPlacement) obj; - - if (!getClusterName().equals(other.getClusterName())) return false; - if (!getClusterUuid().equals(other.getClusterUuid())) 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(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.JobPlacement parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobPlacement} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.JobPlacement) - com.google.cloud.dataproc.v1beta2.JobPlacementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobPlacement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobPlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobPlacement.class, - com.google.cloud.dataproc.v1beta2.JobPlacement.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobPlacement_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobPlacement getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.JobPlacement.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobPlacement build() { - com.google.cloud.dataproc.v1beta2.JobPlacement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobPlacement buildPartial() { - com.google.cloud.dataproc.v1beta2.JobPlacement result = - new com.google.cloud.dataproc.v1beta2.JobPlacement(this); - result.clusterName_ = clusterName_; - result.clusterUuid_ = clusterUuid_; - 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.v1beta2.JobPlacement) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.JobPlacement) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.JobPlacement other) { - if (other == com.google.cloud.dataproc.v1beta2.JobPlacement.getDefaultInstance()) return this; - if (!other.getClusterName().isEmpty()) { - clusterName_ = other.clusterName_; - onChanged(); - } - if (!other.getClusterUuid().isEmpty()) { - clusterUuid_ = other.clusterUuid_; - 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.v1beta2.JobPlacement parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.JobPlacement) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - 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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.JobPlacement) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.JobPlacement) - private static final com.google.cloud.dataproc.v1beta2.JobPlacement DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.JobPlacement(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobPlacement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacementOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacementOrBuilder.java deleted file mode 100644 index 5c49ecaa..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobPlacementOrBuilder.java +++ /dev/null @@ -1,77 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface JobPlacementOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobReference.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobReference.java deleted file mode 100644 index 61c31c8b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Encapsulates the full scoping used to reference a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.JobReference} - */ -public final class JobReference extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobReference_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobReference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobReference.class, - com.google.cloud.dataproc.v1beta2.JobReference.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 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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getJobIdBytes().isEmpty()) { - 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.v1beta2.JobReference)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.JobReference other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobReference} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.JobReference) - com.google.cloud.dataproc.v1beta2.JobReferenceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobReference_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobReference_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobReference.class, - com.google.cloud.dataproc.v1beta2.JobReference.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobReference_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobReference getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.JobReference.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobReference build() { - com.google.cloud.dataproc.v1beta2.JobReference result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobReference buildPartial() { - com.google.cloud.dataproc.v1beta2.JobReference result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.JobReference) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.JobReference other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.JobReference) 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 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.v1beta2.JobReference) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.JobReference) - private static final com.google.cloud.dataproc.v1beta2.JobReference DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.JobReference(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobReference getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobReferenceOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobReferenceOrBuilder.java deleted file mode 100644 index 46cbbf22..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface JobReferenceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.JobReference) - 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(); - - /** - * - * - *
-   * 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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobScheduling.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobScheduling.java deleted file mode 100644 index 77c1a9ea..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobScheduling.java +++ /dev/null @@ -1,565 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Job scheduling options.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.JobScheduling} - */ -public final class JobScheduling extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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; - } - 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobScheduling_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobScheduling_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobScheduling.class, - com.google.cloud.dataproc.v1beta2.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 terminating 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.
-   * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - @java.lang.Override - public int getMaxFailuresPerHour() { - return maxFailuresPerHour_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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_); - } - 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_); - } - 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.v1beta2.JobScheduling)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.JobScheduling other = - (com.google.cloud.dataproc.v1beta2.JobScheduling) obj; - - if (getMaxFailuresPerHour() != other.getMaxFailuresPerHour()) 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 = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.JobScheduling parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobScheduling} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.JobScheduling) - com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobScheduling_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobScheduling_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobScheduling.class, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobScheduling_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobScheduling getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobScheduling build() { - com.google.cloud.dataproc.v1beta2.JobScheduling result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobScheduling buildPartial() { - com.google.cloud.dataproc.v1beta2.JobScheduling result = - new com.google.cloud.dataproc.v1beta2.JobScheduling(this); - result.maxFailuresPerHour_ = maxFailuresPerHour_; - 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.v1beta2.JobScheduling) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.JobScheduling) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.JobScheduling other) { - if (other == com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance()) - return this; - if (other.getMaxFailuresPerHour() != 0) { - setMaxFailuresPerHour(other.getMaxFailuresPerHour()); - } - 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.v1beta2.JobScheduling parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 terminating 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.
-     * 
- * - * 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 terminating 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.
-     * 
- * - * 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 terminating 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.
-     * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearMaxFailuresPerHour() { - - maxFailuresPerHour_ = 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.v1beta2.JobScheduling) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.JobScheduling) - private static final com.google.cloud.dataproc.v1beta2.JobScheduling DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.JobScheduling(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobSchedulingOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobSchedulingOrBuilder.java deleted file mode 100644 index 2ee8fbcf..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobSchedulingOrBuilder.java +++ /dev/null @@ -1,43 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface JobSchedulingOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.JobScheduling) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Maximum number of times per hour a driver may be restarted as
-   * a result of driver terminating 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.
-   * 
- * - * int32 max_failures_per_hour = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The maxFailuresPerHour. - */ - int getMaxFailuresPerHour(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatus.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatus.java deleted file mode 100644 index 8bdc763c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatus.java +++ /dev/null @@ -1,1794 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Dataproc job status.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.JobStatus} - */ -public final class JobStatus extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobStatus.class, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder.class); - } - - /** - * - * - *
-   * The job state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobStatus.State) - } - - /** - * - * - *
-   * The job substate.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.JobStatus.State result = - com.google.cloud.dataproc.v1beta2.JobStatus.State.valueOf(state_); - return result == null ? com.google.cloud.dataproc.v1beta2.JobStatus.State.UNRECOGNIZED : result; - } - - public static final int DETAILS_FIELD_NUMBER = 2; - private volatile java.lang.Object details_; - /** - * - * - *
-   * Output only. Optional Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * string details = 2 [(.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. Optional Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * string details = 2 [(.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 = 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.v1beta2.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.v1beta2.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.JobStatus.Substate result = - com.google.cloud.dataproc.v1beta2.JobStatus.Substate.valueOf(substate_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, state_); - } - if (!getDetailsBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, details_); - } - if (stateStartTime_ != null) { - output.writeMessage(6, getStateStartTime()); - } - if (substate_ != com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); - } - if (!getDetailsBytes().isEmpty()) { - 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.v1beta2.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.v1beta2.JobStatus)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.JobStatus other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobStatus} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.JobStatus) - com.google.cloud.dataproc.v1beta2.JobStatusOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobStatus_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobStatus_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.JobStatus.class, - com.google.cloud.dataproc.v1beta2.JobStatus.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_JobStatus_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.JobStatus.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus build() { - com.google.cloud.dataproc.v1beta2.JobStatus result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus buildPartial() { - com.google.cloud.dataproc.v1beta2.JobStatus result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.JobStatus) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.JobStatus other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.JobStatus.State result = - com.google.cloud.dataproc.v1beta2.JobStatus.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.JobStatus.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. A state message specifying the overall job state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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_ = ""; - /** - * - * - *
-     * Output only. Optional Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * string details = 2 [(.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. Optional Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * string details = 2 [(.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. Optional Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * string details = 2 [(.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. Optional Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearDetails() { - - details_ = getDefaultInstance().getDetails(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Optional Job state details, such as an error
-     * description if the state is <code>ERROR</code>.
-     * 
- * - * string details = 2 [(.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 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.v1beta2.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.v1beta2.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.v1beta2.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobStatus.Substate getSubstate() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.JobStatus.Substate result = - com.google.cloud.dataproc.v1beta2.JobStatus.Substate.valueOf(substate_); - return result == null - ? com.google.cloud.dataproc.v1beta2.JobStatus.Substate.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. Additional state information, which includes
-     * status reported by the agent.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.JobStatus) - private static final com.google.cloud.dataproc.v1beta2.JobStatus DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.JobStatus(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatusOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatusOrBuilder.java deleted file mode 100644 index 34fef0e5..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobStatusOrBuilder.java +++ /dev/null @@ -1,153 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface JobStatusOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.JobStatus) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A state message specifying the overall job state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobStatus.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1beta2.JobStatus.State getState(); - - /** - * - * - *
-   * Output only. Optional Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The details. - */ - java.lang.String getDetails(); - /** - * - * - *
-   * Output only. Optional Job state details, such as an error
-   * description if the state is <code>ERROR</code>.
-   * 
- * - * string details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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.v1beta2.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.v1beta2.JobStatus.Substate substate = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The substate. - */ - com.google.cloud.dataproc.v1beta2.JobStatus.Substate getSubstate(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobsProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/JobsProto.java deleted file mode 100644 index 5060ff89..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -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_v1beta2_LoggingConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_DriverLogLevelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_DriverLogLevelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_QueryList_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_QueryList_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_HiveJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_HiveJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_HiveJob_ScriptVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_HiveJob_ScriptVariablesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_HiveJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_HiveJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_ScriptVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_ScriptVariablesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PigJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PigJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PigJob_ScriptVariablesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PigJob_ScriptVariablesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PigJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PigJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_PropertiesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_PropertiesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_JobPlacement_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_JobPlacement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_JobStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_JobStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_JobReference_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_JobReference_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_YarnApplication_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_YarnApplication_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_Job_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_Job_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_Job_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_Job_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_JobScheduling_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_JobScheduling_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_JobMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_JobMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_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/v1beta2/jobs.pro" - + "to\022\035google.cloud.dataproc.v1beta2\032\034googl" - + "e/api/annotations.proto\032\027google/api/clie" - + "nt.proto\032\037google/api/field_behavior.prot" - + "o\032#google/longrunning/operations.proto\032\033" - + "google/protobuf/empty.proto\032 google/prot" - + "obuf/field_mask.proto\032\037google/protobuf/t" - + "imestamp.proto\"\313\002\n\rLoggingConfig\022\\\n\021driv" - + "er_log_levels\030\002 \003(\0132A.google.cloud.datap" - + "roc.v1beta2.LoggingConfig.DriverLogLevel" - + "sEntry\032j\n\024DriverLogLevelsEntry\022\013\n\003key\030\001 " - + "\001(\t\022A\n\005value\030\002 \001(\01622.google.cloud.datapr" - + "oc.v1beta2.LoggingConfig.Level:\0028\001\"p\n\005Le" - + "vel\022\025\n\021LEVEL_UNSPECIFIED\020\000\022\007\n\003ALL\020\001\022\t\n\005T" - + "RACE\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\"\373\002\n\tHadoopJ" - + "ob\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\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\014archive_uris\030\006 \003(\tB\003\340A\001\022Q\n\nprope" - + "rties\030\007 \003(\01328.google.cloud.dataproc.v1be" - + "ta2.HadoopJob.PropertiesEntryB\003\340A\001\022I\n\016lo" - + "gging_config\030\010 \001(\0132,.google.cloud.datapr" - + "oc.v1beta2.LoggingConfigB\003\340A\001\0321\n\017Propert" - + "iesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "B\010\n\006driver\"\371\002\n\010SparkJob\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\004ar" - + "gs\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_uri" - + "s\030\006 \003(\tB\003\340A\001\022P\n\nproperties\030\007 \003(\01327.googl" - + "e.cloud.dataproc.v1beta2.SparkJob.Proper" - + "tiesEntryB\003\340A\001\022I\n\016logging_config\030\010 \001(\0132," - + ".google.cloud.dataproc.v1beta2.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\"\202\003\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\022R\n\nproperties\030\007 \003(\01329.google.c" - + "loud.dataproc.v1beta2.PySparkJob.Propert" - + "iesEntryB\003\340A\001\022I\n\016logging_config\030\010 \001(\0132,." - + "google.cloud.dataproc.v1beta2.LoggingCon" - + "figB\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\007quer" - + "ies\030\001 \003(\tB\003\340A\002\"\304\003\n\007HiveJob\022\030\n\016query_file" - + "_uri\030\001 \001(\tH\000\022>\n\nquery_list\030\002 \001(\0132(.googl" - + "e.cloud.dataproc.v1beta2.QueryListH\000\022 \n\023" - + "continue_on_failure\030\003 \001(\010B\003\340A\001\022Z\n\020script" - + "_variables\030\004 \003(\0132;.google.cloud.dataproc" - + ".v1beta2.HiveJob.ScriptVariablesEntryB\003\340" - + "A\001\022O\n\nproperties\030\005 \003(\01326.google.cloud.da" - + "taproc.v1beta2.HiveJob.PropertiesEntryB\003" - + "\340A\001\022\032\n\rjar_file_uris\030\006 \003(\tB\003\340A\001\0326\n\024Scrip" - + "tVariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\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\"\371\003\n\013SparkS" - + "qlJob\022\030\n\016query_file_uri\030\001 \001(\tH\000\022>\n\nquery" - + "_list\030\002 \001(\0132(.google.cloud.dataproc.v1be" - + "ta2.QueryListH\000\022^\n\020script_variables\030\003 \003(" - + "\0132?.google.cloud.dataproc.v1beta2.SparkS" - + "qlJob.ScriptVariablesEntryB\003\340A\001\022S\n\nprope" - + "rties\030\004 \003(\0132:.google.cloud.dataproc.v1be" - + "ta2.SparkSqlJob.PropertiesEntryB\003\340A\001\022\032\n\r" - + "jar_file_uris\0308 \003(\tB\003\340A\001\022I\n\016logging_conf" - + "ig\030\006 \001(\0132,.google.cloud.dataproc.v1beta2" - + ".LoggingConfigB\003\340A\001\0326\n\024ScriptVariablesEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0321\n\017P" - + "ropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" - + "(\t:\0028\001B\t\n\007queries\"\214\004\n\006PigJob\022\030\n\016query_fi" - + "le_uri\030\001 \001(\tH\000\022>\n\nquery_list\030\002 \001(\0132(.goo" - + "gle.cloud.dataproc.v1beta2.QueryListH\000\022 " - + "\n\023continue_on_failure\030\003 \001(\010B\003\340A\001\022Y\n\020scri" - + "pt_variables\030\004 \003(\0132:.google.cloud.datapr" - + "oc.v1beta2.PigJob.ScriptVariablesEntryB\003" - + "\340A\001\022N\n\nproperties\030\005 \003(\01325.google.cloud.d" - + "ataproc.v1beta2.PigJob.PropertiesEntryB\003" - + "\340A\001\022\032\n\rjar_file_uris\030\006 \003(\tB\003\340A\001\022I\n\016loggi" - + "ng_config\030\007 \001(\0132,.google.cloud.dataproc." - + "v1beta2.LoggingConfigB\003\340A\001\0326\n\024ScriptVari" - + "ablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" - + "8\001\0321\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001B\t\n\007queries\"\300\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\014archi" - + "ve_uris\030\004 \003(\tB\003\340A\001\022Q\n\nproperties\030\005 \003(\01328" - + ".google.cloud.dataproc.v1beta2.SparkRJob" - + ".PropertiesEntryB\003\340A\001\022I\n\016logging_config\030" - + "\006 \001(\0132,.google.cloud.dataproc.v1beta2.Lo" - + "ggingConfigB\003\340A\001\0321\n\017PropertiesEntry\022\013\n\003k" - + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\231\003\n\tPrestoJo" - + "b\022\030\n\016query_file_uri\030\001 \001(\tH\000\022>\n\nquery_lis" - + "t\030\002 \001(\0132(.google.cloud.dataproc.v1beta2." - + "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\022Q\n\nproperties\030\006 \003(\0132" - + "8.google.cloud.dataproc.v1beta2.PrestoJo" - + "b.PropertiesEntryB\003\340A\001\022I\n\016logging_config" - + "\030\007 \001(\0132,.google.cloud.dataproc.v1beta2.L" - + "oggingConfigB\003\340A\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\"" - + "D\n\014JobPlacement\022\031\n\014cluster_name\030\001 \001(\tB\003\340" - + "A\002\022\031\n\014cluster_uuid\030\002 \001(\tB\003\340A\003\"\340\003\n\tJobSta" - + "tus\022B\n\005state\030\001 \001(\0162..google.cloud.datapr" - + "oc.v1beta2.JobStatus.StateB\003\340A\003\022\024\n\007detai" - + "ls\030\002 \001(\tB\003\340A\003\0229\n\020state_start_time\030\006 \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003\022H\n\010subs" - + "tate\030\007 \001(\01621.google.cloud.dataproc.v1bet" - + "a2.JobStatus.SubstateB\003\340A\003\"\251\001\n\005State\022\025\n\021" - + "STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022\016\n\nSETU" - + "P_DONE\020\010\022\013\n\007RUNNING\020\002\022\022\n\016CANCEL_PENDING\020" - + "\003\022\022\n\016CANCEL_STARTED\020\007\022\r\n\tCANCELLED\020\004\022\010\n\004" - + "DONE\020\005\022\t\n\005ERROR\020\006\022\023\n\017ATTEMPT_FAILURE\020\t\"H" - + "\n\010Substate\022\017\n\013UNSPECIFIED\020\000\022\r\n\tSUBMITTED" - + "\020\001\022\n\n\006QUEUED\020\002\022\020\n\014STALE_STATUS\020\003\"<\n\014JobR" - + "eference\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006job" - + "_id\030\002 \001(\tB\003\340A\001\"\252\002\n\017YarnApplication\022\021\n\004na" - + "me\030\001 \001(\tB\003\340A\003\022H\n\005state\030\002 \001(\01624.google.cl" - + "oud.dataproc.v1beta2.YarnApplication.Sta" - + "teB\003\340A\003\022\025\n\010progress\030\003 \001(\002B\003\340A\003\022\031\n\014tracki" - + "ng_url\030\004 \001(\tB\003\340A\003\"\207\001\n\005State\022\025\n\021STATE_UNS" - + "PECIFIED\020\000\022\007\n\003NEW\020\001\022\016\n\nNEW_SAVING\020\002\022\r\n\tS" - + "UBMITTED\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\"\345\t\n\003" - + "Job\022C\n\treference\030\001 \001(\0132+.google.cloud.da" - + "taproc.v1beta2.JobReferenceB\003\340A\001\022C\n\tplac" - + "ement\030\002 \001(\0132+.google.cloud.dataproc.v1be" - + "ta2.JobPlacementB\003\340A\002\022C\n\nhadoop_job\030\003 \001(" - + "\0132(.google.cloud.dataproc.v1beta2.Hadoop" - + "JobB\003\340A\001H\000\022A\n\tspark_job\030\004 \001(\0132\'.google.c" - + "loud.dataproc.v1beta2.SparkJobB\003\340A\001H\000\022E\n" - + "\013pyspark_job\030\005 \001(\0132).google.cloud.datapr" - + "oc.v1beta2.PySparkJobB\003\340A\001H\000\022?\n\010hive_job" - + "\030\006 \001(\0132&.google.cloud.dataproc.v1beta2.H" - + "iveJobB\003\340A\001H\000\022=\n\007pig_job\030\007 \001(\0132%.google." - + "cloud.dataproc.v1beta2.PigJobB\003\340A\001H\000\022D\n\013" - + "spark_r_job\030\025 \001(\0132(.google.cloud.datapro" - + "c.v1beta2.SparkRJobB\003\340A\001H\000\022H\n\rspark_sql_" - + "job\030\014 \001(\0132*.google.cloud.dataproc.v1beta" - + "2.SparkSqlJobB\003\340A\001H\000\022C\n\npresto_job\030\027 \001(\013" - + "2(.google.cloud.dataproc.v1beta2.PrestoJ" - + "obB\003\340A\001H\000\022=\n\006status\030\010 \001(\0132(.google.cloud" - + ".dataproc.v1beta2.JobStatusB\003\340A\003\022E\n\016stat" - + "us_history\030\r \003(\0132(.google.cloud.dataproc" - + ".v1beta2.JobStatusB\003\340A\003\022N\n\021yarn_applicat" - + "ions\030\t \003(\0132..google.cloud.dataproc.v1bet" - + "a2.YarnApplicationB\003\340A\003\022\031\n\014submitted_by\030" - + "\n \001(\tB\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\022C\n\006labels\030\022 \003(\0132..google.clou" - + "d.dataproc.v1beta2.Job.LabelsEntryB\003\340A\001\022" - + "E\n\nscheduling\030\024 \001(\0132,.google.cloud.datap" - + "roc.v1beta2.JobSchedulingB\003\340A\001\022\025\n\010job_uu" - + "id\030\026 \001(\tB\003\340A\003\022\021\n\004done\030\030 \001(\010B\003\340A\003\032-\n\013Labe" - + "lsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B" - + "\n\n\010type_job\"3\n\rJobScheduling\022\"\n\025max_fail" - + "ures_per_hour\030\001 \001(\005B\003\340A\001\"\263\001\n\013JobMetadata" - + "\022\023\n\006job_id\030\001 \001(\tB\003\340A\003\022=\n\006status\030\002 \001(\0132(." - + "google.cloud.dataproc.v1beta2.JobStatusB" - + "\003\340A\003\022\033\n\016operation_type\030\003 \001(\tB\003\340A\003\0223\n\nsta" - + "rt_time\030\004 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\003\"\217\001\n\020SubmitJobRequest\022\027\n\nproject_i" - + "d\030\001 \001(\tB\003\340A\002\022\023\n\006region\030\003 \001(\tB\003\340A\002\0224\n\003job" - + "\030\002 \001(\0132\".google.cloud.dataproc.v1beta2.J" - + "obB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\tB\003\340A\001\"R\n\rGetJ" - + "obRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n\006re" - + "gion\030\003 \001(\tB\003\340A\002\022\023\n\006job_id\030\002 \001(\tB\003\340A\002\"\270\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\014clust" - + "er_name\030\004 \001(\tB\003\340A\001\022^\n\021job_state_matcher\030" - + "\005 \001(\0162>.google.cloud.dataproc.v1beta2.Li" - + "stJobsRequest.JobStateMatcherB\003\340A\001\022\023\n\006fi" - + "lter\030\007 \001(\tB\003\340A\001\"6\n\017JobStateMatcher\022\007\n\003AL" - + "L\020\000\022\n\n\006ACTIVE\020\001\022\016\n\nNON_ACTIVE\020\002\"\301\001\n\020Upda" - + "teJobRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\022\023\n" - + "\006region\030\002 \001(\tB\003\340A\002\022\023\n\006job_id\030\003 \001(\tB\003\340A\002\022" - + "4\n\003job\030\004 \001(\0132\".google.cloud.dataproc.v1b" - + "eta2.JobB\003\340A\002\0224\n\013update_mask\030\005 \001(\0132\032.goo" - + "gle.protobuf.FieldMaskB\003\340A\002\"g\n\020ListJobsR" - + "esponse\0225\n\004jobs\030\001 \003(\0132\".google.cloud.dat" - + "aproc.v1beta2.JobB\003\340A\003\022\034\n\017next_page_toke" - + "n\030\002 \001(\tB\003\340A\001\"U\n\020CancelJobRequest\022\027\n\nproj" - + "ect_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(\t" - + "B\003\340A\002\022\023\n\006job_id\030\002 \001(\tB\003\340A\0022\347\013\n\rJobContro" - + "ller\022\302\001\n\tSubmitJob\022/.google.cloud.datapr" - + "oc.v1beta2.SubmitJobRequest\032\".google.clo" - + "ud.dataproc.v1beta2.Job\"`\202\323\344\223\002@\";/v1beta" - + "2/projects/{project_id}/regions/{region}" - + "/jobs:submit:\001*\332A\027project_id, region, jo" - + "b\022\351\001\n\024SubmitJobAsOperation\022/.google.clou" - + "d.dataproc.v1beta2.SubmitJobRequest\032\035.go" - + "ogle.longrunning.Operation\"\200\001\202\323\344\223\002K\"F/v1" - + "beta2/projects/{project_id}/regions/{reg" - + "ion}/jobs:submitAsOperation:\001*\332A\027project" - + "_id, region, job\312A\022\n\003Job\022\013JobMetadata\022\276\001" - + "\n\006GetJob\022,.google.cloud.dataproc.v1beta2" - + ".GetJobRequest\032\".google.cloud.dataproc.v" - + "1beta2.Job\"b\202\323\344\223\002?\022=/v1beta2/projects/{p" - + "roject_id}/regions/{region}/jobs/{job_id" - + "}\332A\032project_id, region, job_id\022\333\001\n\010ListJ" - + "obs\022..google.cloud.dataproc.v1beta2.List" - + "JobsRequest\032/.google.cloud.dataproc.v1be" - + "ta2.ListJobsResponse\"n\202\323\344\223\0026\0224/v1beta2/p" - + "rojects/{project_id}/regions/{region}/jo" - + "bs\332A\022project_id, region\332A\032project_id, re" - + "gion, filter\022\254\001\n\tUpdateJob\022/.google.clou" - + "d.dataproc.v1beta2.UpdateJobRequest\032\".go" - + "ogle.cloud.dataproc.v1beta2.Job\"J\202\323\344\223\002D2" - + "=/v1beta2/projects/{project_id}/regions/" - + "{region}/jobs/{job_id}:\003job\022\316\001\n\tCancelJo" - + "b\022/.google.cloud.dataproc.v1beta2.Cancel" - + "JobRequest\032\".google.cloud.dataproc.v1bet" - + "a2.Job\"l\202\323\344\223\002I\"D/v1beta2/projects/{proje" - + "ct_id}/regions/{region}/jobs/{job_id}:ca" - + "ncel:\001*\332A\032project_id, region, job_id\022\270\001\n" - + "\tDeleteJob\022/.google.cloud.dataproc.v1bet" - + "a2.DeleteJobRequest\032\026.google.protobuf.Em" - + "pty\"b\202\323\344\223\002?*=/v1beta2/projects/{project_" - + "id}/regions/{region}/jobs/{job_id}\332A\032pro" - + "ject_id, region, job_id\032K\312A\027dataproc.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformBw\n!com.google.cloud" - + ".dataproc.v1beta2B\tJobsProtoP\001ZEgoogle.g" - + "olang.org/genproto/googleapis/cloud/data" - + "proc/v1beta2;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_v1beta2_LoggingConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_descriptor, - new java.lang.String[] { - "DriverLogLevels", - }); - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_DriverLogLevelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_DriverLogLevelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_DriverLogLevelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_descriptor, - new java.lang.String[] { - "MainJarFileUri", - "MainClass", - "Args", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Properties", - "LoggingConfig", - "Driver", - }); - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_HadoopJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkJob_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1beta2_SparkJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkJob_descriptor, - new java.lang.String[] { - "MainJarFileUri", - "MainClass", - "Args", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Properties", - "LoggingConfig", - "Driver", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_SparkJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_SparkJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_descriptor, - new java.lang.String[] { - "MainPythonFileUri", - "Args", - "PythonFileUris", - "JarFileUris", - "FileUris", - "ArchiveUris", - "Properties", - "LoggingConfig", - }); - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PySparkJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_QueryList_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1beta2_QueryList_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_QueryList_descriptor, - new java.lang.String[] { - "Queries", - }); - internal_static_google_cloud_dataproc_v1beta2_HiveJob_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1beta2_HiveJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_HiveJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ContinueOnFailure", - "ScriptVariables", - "Properties", - "JarFileUris", - "Queries", - }); - internal_static_google_cloud_dataproc_v1beta2_HiveJob_ScriptVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_HiveJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_HiveJob_ScriptVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_HiveJob_ScriptVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_HiveJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_HiveJob_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1beta2_HiveJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_HiveJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ScriptVariables", - "Properties", - "JarFileUris", - "LoggingConfig", - "Queries", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_ScriptVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_ScriptVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_ScriptVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_PigJob_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1beta2_PigJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PigJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ContinueOnFailure", - "ScriptVariables", - "Properties", - "JarFileUris", - "LoggingConfig", - "Queries", - }); - internal_static_google_cloud_dataproc_v1beta2_PigJob_ScriptVariablesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_PigJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_PigJob_ScriptVariablesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PigJob_ScriptVariablesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_PigJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_PigJob_descriptor.getNestedTypes().get(1); - internal_static_google_cloud_dataproc_v1beta2_PigJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PigJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_descriptor, - new java.lang.String[] { - "MainRFileUri", "Args", "FileUris", "ArchiveUris", "Properties", "LoggingConfig", - }); - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SparkRJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_descriptor, - new java.lang.String[] { - "QueryFileUri", - "QueryList", - "ContinueOnFailure", - "OutputFormat", - "ClientTags", - "Properties", - "LoggingConfig", - "Queries", - }); - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_PropertiesEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_PropertiesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_PrestoJob_PropertiesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_JobPlacement_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1beta2_JobPlacement_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_JobPlacement_descriptor, - new java.lang.String[] { - "ClusterName", "ClusterUuid", - }); - internal_static_google_cloud_dataproc_v1beta2_JobStatus_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_dataproc_v1beta2_JobStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_JobStatus_descriptor, - new java.lang.String[] { - "State", "Details", "StateStartTime", "Substate", - }); - internal_static_google_cloud_dataproc_v1beta2_JobReference_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_dataproc_v1beta2_JobReference_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_JobReference_descriptor, - new java.lang.String[] { - "ProjectId", "JobId", - }); - internal_static_google_cloud_dataproc_v1beta2_YarnApplication_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dataproc_v1beta2_YarnApplication_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_YarnApplication_descriptor, - new java.lang.String[] { - "Name", "State", "Progress", "TrackingUrl", - }); - internal_static_google_cloud_dataproc_v1beta2_Job_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_dataproc_v1beta2_Job_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_Job_descriptor, - new java.lang.String[] { - "Reference", - "Placement", - "HadoopJob", - "SparkJob", - "PysparkJob", - "HiveJob", - "PigJob", - "SparkRJob", - "SparkSqlJob", - "PrestoJob", - "Status", - "StatusHistory", - "YarnApplications", - "SubmittedBy", - "DriverOutputResourceUri", - "DriverControlFilesUri", - "Labels", - "Scheduling", - "JobUuid", - "Done", - "TypeJob", - }); - internal_static_google_cloud_dataproc_v1beta2_Job_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_Job_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_Job_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_Job_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_JobScheduling_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_dataproc_v1beta2_JobScheduling_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_JobScheduling_descriptor, - new java.lang.String[] { - "MaxFailuresPerHour", - }); - internal_static_google_cloud_dataproc_v1beta2_JobMetadata_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_dataproc_v1beta2_JobMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_JobMetadata_descriptor, - new java.lang.String[] { - "JobId", "Status", "OperationType", "StartTime", - }); - internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "Job", "RequestId", - }); - internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GetJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", - }); - internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_descriptor, - new java.lang.String[] { - "ProjectId", - "Region", - "PageSize", - "PageToken", - "ClusterName", - "JobStateMatcher", - "Filter", - }); - internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", "Job", "UpdateMask", - }); - internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_descriptor, - new java.lang.String[] { - "Jobs", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_CancelJobRequest_descriptor, - new java.lang.String[] { - "ProjectId", "Region", "JobId", - }); - internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_dataproc_v1beta2_DeleteJobRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfig.java deleted file mode 100644 index e05bf0af..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfig.java +++ /dev/null @@ -1,3142 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies Kerberos related configuration.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.KerberosConfig} - */ -public final class KerberosConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.KerberosConfig.class, - com.google.cloud.dataproc.v1beta2.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_; - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @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_; - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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 (!getRootPrincipalPasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rootPrincipalPasswordUri_); - } - if (!getKmsKeyUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, kmsKeyUri_); - } - if (!getKeystoreUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, keystoreUri_); - } - if (!getTruststoreUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, truststoreUri_); - } - if (!getKeystorePasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, keystorePasswordUri_); - } - if (!getKeyPasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, keyPasswordUri_); - } - if (!getTruststorePasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, truststorePasswordUri_); - } - if (!getCrossRealmTrustRealmBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, crossRealmTrustRealm_); - } - if (!getCrossRealmTrustKdcBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, crossRealmTrustKdc_); - } - if (!getCrossRealmTrustAdminServerBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, crossRealmTrustAdminServer_); - } - if (!getCrossRealmTrustSharedPasswordUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 12, crossRealmTrustSharedPasswordUri_); - } - if (!getKdcDbKeyUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 13, kdcDbKeyUri_); - } - if (tgtLifetimeHours_ != 0) { - output.writeInt32(14, tgtLifetimeHours_); - } - if (!getRealmBytes().isEmpty()) { - 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 (!getRootPrincipalPasswordUriBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rootPrincipalPasswordUri_); - } - if (!getKmsKeyUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, kmsKeyUri_); - } - if (!getKeystoreUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, keystoreUri_); - } - if (!getTruststoreUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, truststoreUri_); - } - if (!getKeystorePasswordUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, keystorePasswordUri_); - } - if (!getKeyPasswordUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, keyPasswordUri_); - } - if (!getTruststorePasswordUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, truststorePasswordUri_); - } - if (!getCrossRealmTrustRealmBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, crossRealmTrustRealm_); - } - if (!getCrossRealmTrustKdcBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, crossRealmTrustKdc_); - } - if (!getCrossRealmTrustAdminServerBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize(11, crossRealmTrustAdminServer_); - } - if (!getCrossRealmTrustSharedPasswordUriBytes().isEmpty()) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 12, crossRealmTrustSharedPasswordUri_); - } - if (!getKdcDbKeyUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, kdcDbKeyUri_); - } - if (tgtLifetimeHours_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, tgtLifetimeHours_); - } - if (!getRealmBytes().isEmpty()) { - 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.v1beta2.KerberosConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.KerberosConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.KerberosConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.KerberosConfig) - com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.KerberosConfig.class, - com.google.cloud.dataproc.v1beta2.KerberosConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_KerberosConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.KerberosConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.KerberosConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.KerberosConfig build() { - com.google.cloud.dataproc.v1beta2.KerberosConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.KerberosConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.KerberosConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.KerberosConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.KerberosConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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_ = ""; - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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; - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearRootPrincipalPasswordUri() { - - rootPrincipalPasswordUri_ = getDefaultInstance().getRootPrincipalPasswordUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-     * principal password.
-     * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @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_ = ""; - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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; - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearKmsKeyUri() { - - kmsKeyUri_ = getDefaultInstance().getKmsKeyUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The uri of the KMS key used to encrypt various sensitive
-     * files.
-     * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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.v1beta2.KerberosConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.KerberosConfig) - private static final com.google.cloud.dataproc.v1beta2.KerberosConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.KerberosConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/KerberosConfigOrBuilder.java deleted file mode 100644 index a947cb29..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface KerberosConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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(); - - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The rootPrincipalPasswordUri. - */ - java.lang.String getRootPrincipalPasswordUri(); - /** - * - * - *
-   * Required. The Cloud Storage URI of a KMS encrypted file containing the root
-   * principal password.
-   * 
- * - * string root_principal_password_uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for rootPrincipalPasswordUri. - */ - com.google.protobuf.ByteString getRootPrincipalPasswordUriBytes(); - - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The kmsKeyUri. - */ - java.lang.String getKmsKeyUri(); - /** - * - * - *
-   * Required. The uri of the KMS key used to encrypt various sensitive
-   * files.
-   * 
- * - * string kms_key_uri = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfig.java deleted file mode 100644 index 9f24fef7..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfig.java +++ /dev/null @@ -1,1901 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies the cluster auto-delete schedule configuration.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.LifecycleConfig} - */ -public final class LifecycleConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.LifecycleConfig.class, - com.google.cloud.dataproc.v1beta2.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 10 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 10 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 10 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.v1beta2.LifecycleConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.LifecycleConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LifecycleConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.LifecycleConfig) - com.google.cloud.dataproc.v1beta2.LifecycleConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.LifecycleConfig.class, - com.google.cloud.dataproc.v1beta2.LifecycleConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_LifecycleConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LifecycleConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.LifecycleConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LifecycleConfig build() { - com.google.cloud.dataproc.v1beta2.LifecycleConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LifecycleConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.LifecycleConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.LifecycleConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.LifecycleConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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 10 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.v1beta2.LifecycleConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.LifecycleConfig) - private static final com.google.cloud.dataproc.v1beta2.LifecycleConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.LifecycleConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LifecycleConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LifecycleConfigOrBuilder.java deleted file mode 100644 index 047450d6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface LifecycleConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 10 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 10 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 10 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.v1beta2.LifecycleConfig.TtlCase getTtlCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequest.java deleted file mode 100644 index 81a47aaf..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequest.java +++ /dev/null @@ -1,988 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to list autoscaling policies in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest} - */ -public final class ListAutoscalingPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest) - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest.class, - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest build() { - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest) - private static final com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesRequestOrBuilder.java deleted file mode 100644 index b150cec2..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListAutoscalingPoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponse.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponse.java deleted file mode 100644 index d1c863f6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponse.java +++ /dev/null @@ -1,1203 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A response to a request to list autoscaling policies in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse} - */ -public final class ListAutoscalingPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicies(int index) { - return policies_.get(index); - } - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse) - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse.class, - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse.Builder.class); - } - - // Construct using - // com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_ListAutoscalingPoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse build() { - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse buildPartial() { - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder> - policiesBuilder_; - - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPolicies( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setPolicies( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies(com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addPolicies( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder getPoliciesBuilder( - int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder addPoliciesBuilder( - int index) { - return getPoliciesFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Autoscaling policies list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse) - private static final com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListAutoscalingPoliciesResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponseOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListAutoscalingPoliciesResponseOrBuilder.java deleted file mode 100644 index 9cdac1f0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListAutoscalingPoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getPoliciesList(); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicies(int index); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getPoliciesCount(); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getPoliciesOrBuilderList(); - /** - * - * - *
-   * Output only. Autoscaling policies list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.AutoscalingPolicy policies = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequest.java deleted file mode 100644 index 75d71d1d..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequest.java +++ /dev/null @@ -1,1369 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to list the clusters in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListClustersRequest} - */ -public final class ListClustersRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListClustersRequest.class, - com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, region_); - } - if (!getFilterBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, region_); - } - if (!getFilterBytes().isEmpty()) { - 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.v1beta2.ListClustersRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListClustersRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListClustersRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListClustersRequest) - com.google.cloud.dataproc.v1beta2.ListClustersRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListClustersRequest.class, - com.google.cloud.dataproc.v1beta2.ListClustersRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListClustersRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListClustersRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListClustersRequest build() { - com.google.cloud.dataproc.v1beta2.ListClustersRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListClustersRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.ListClustersRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListClustersRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ListClustersRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListClustersRequest) - private static final com.google.cloud.dataproc.v1beta2.ListClustersRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListClustersRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersRequestOrBuilder.java deleted file mode 100644 index 8ed7527e..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListClustersRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponse.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponse.java deleted file mode 100644 index c7e75802..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponse.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The list of all clusters in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListClustersResponse} - */ -public final class ListClustersResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListClustersResponse.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Cluster getClusters(int index) { - return clusters_.get(index); - } - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 <code>ListClustersRequest</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>ListClustersRequest</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 < clusters_.size(); i++) { - output.writeMessage(1, clusters_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < clusters_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, clusters_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.ListClustersResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListClustersResponse other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListClustersResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListClustersResponse) - com.google.cloud.dataproc.v1beta2.ListClustersResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListClustersResponse.class, - com.google.cloud.dataproc.v1beta2.ListClustersResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ListClustersResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListClustersResponse getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListClustersResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListClustersResponse build() { - com.google.cloud.dataproc.v1beta2.ListClustersResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListClustersResponse buildPartial() { - com.google.cloud.dataproc.v1beta2.ListClustersResponse result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListClustersResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ListClustersResponse other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> - clustersBuilder_; - - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setClusters(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setClusters( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters(com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters(com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addClusters( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Cluster.Builder getClustersBuilder(int index) { - return getClustersFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Cluster.Builder addClustersBuilder() { - return getClustersFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Cluster.Builder addClustersBuilder(int index) { - return getClustersFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The clusters in the project.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> - getClustersFieldBuilder() { - if (clustersBuilder_ == null) { - clustersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.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 <code>ListClustersRequest</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>ListClustersRequest</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>ListClustersRequest</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>ListClustersRequest</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>ListClustersRequest</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.v1beta2.ListClustersResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListClustersResponse) - private static final com.google.cloud.dataproc.v1beta2.ListClustersResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListClustersResponse(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListClustersResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponseOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListClustersResponseOrBuilder.java deleted file mode 100644 index f2f2af0f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListClustersResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ListClustersResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getClustersList(); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.Cluster getClusters(int index); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getClustersCount(); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getClustersOrBuilderList(); - /** - * - * - *
-   * Output only. The clusters in the project.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Cluster clusters = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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 <code>ListClustersRequest</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>ListClustersRequest</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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequest.java deleted file mode 100644 index bff2ff49..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequest.java +++ /dev/null @@ -1,1875 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to list jobs in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListJobsRequest} - */ -public final class ListJobsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListJobsRequest.class, - com.google.cloud.dataproc.v1beta2.ListJobsRequest.Builder.class); - } - - /** - * - * - *
-   * A matcher that specifies categories of job states.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The jobStateMatcher. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher getJobStateMatcher() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher result = - com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher.valueOf(jobStateMatcher_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterName_); - } - if (jobStateMatcher_ - != com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher.ALL.getNumber()) { - output.writeEnum(5, jobStateMatcher_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, region_); - } - if (!getFilterBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!getClusterNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterName_); - } - if (jobStateMatcher_ - != com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher.ALL.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, jobStateMatcher_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, region_); - } - if (!getFilterBytes().isEmpty()) { - 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.v1beta2.ListJobsRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListJobsRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListJobsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListJobsRequest) - com.google.cloud.dataproc.v1beta2.ListJobsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListJobsRequest.class, - com.google.cloud.dataproc.v1beta2.ListJobsRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListJobsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsRequest build() { - com.google.cloud.dataproc.v1beta2.ListJobsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.ListJobsRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListJobsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ListJobsRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The jobStateMatcher. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher getJobStateMatcher() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher result = - com.google.cloud.dataproc.v1beta2.ListJobsRequest.JobStateMatcher.valueOf( - jobStateMatcher_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListJobsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListJobsRequest) - private static final com.google.cloud.dataproc.v1beta2.ListJobsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListJobsRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsRequestOrBuilder.java deleted file mode 100644 index 26f74cf4..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListJobsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ListJobsRequest.JobStateMatcher job_state_matcher = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The jobStateMatcher. - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponse.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponse.java deleted file mode 100644 index 86754c14..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponse.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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A list of jobs in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListJobsResponse} - */ -public final class ListJobsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListJobsResponse.class, - com.google.cloud.dataproc.v1beta2.ListJobsResponse.Builder.class); - } - - public static final int JOBS_FIELD_NUMBER = 1; - private java.util.List jobs_; - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Job getJobs(int index) { - return jobs_.get(index); - } - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < jobs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, jobs_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.ListJobsResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListJobsResponse other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListJobsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListJobsResponse) - com.google.cloud.dataproc.v1beta2.ListJobsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListJobsResponse.class, - com.google.cloud.dataproc.v1beta2.ListJobsResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_ListJobsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsResponse getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListJobsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsResponse build() { - com.google.cloud.dataproc.v1beta2.ListJobsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListJobsResponse buildPartial() { - com.google.cloud.dataproc.v1beta2.ListJobsResponse result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListJobsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ListJobsResponse other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.JobOrBuilder> - jobsBuilder_; - - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Job getJobs(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setJobs(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setJobs( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(com.google.cloud.dataproc.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs(com.google.cloud.dataproc.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addJobs( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Job.Builder getJobsBuilder(int index) { - return getJobsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobOrBuilder getJobsOrBuilder(int index) { - if (jobsBuilder_ == null) { - return jobs_.get(index); - } else { - return jobsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Job.Builder addJobsBuilder() { - return getJobsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.Job.Builder addJobsBuilder(int index) { - return getJobsFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Jobs list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.JobOrBuilder> - getJobsFieldBuilder() { - if (jobsBuilder_ == null) { - jobsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListJobsResponse) - private static final com.google.cloud.dataproc.v1beta2.ListJobsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListJobsResponse(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListJobsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponseOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListJobsResponseOrBuilder.java deleted file mode 100644 index 2577420f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListJobsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ListJobsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getJobsList(); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.Job getJobs(int index); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getJobsCount(); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getJobsOrBuilderList(); - /** - * - * - *
-   * Output only. Jobs list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.Job jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java deleted file mode 100644 index b4215cc6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequest.java +++ /dev/null @@ -1,982 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to list workflow templates in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest} - */ -public final class ListWorkflowTemplatesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest) - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest.class, - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest build() { - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ListWorkflowTemplatesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest) - private static final com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesRequestOrBuilder.java deleted file mode 100644 index 20cfa728..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListWorkflowTemplatesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponse.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponse.java deleted file mode 100644 index f1268001..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponse.java +++ /dev/null @@ -1,1207 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A response to a request to list workflow templates in a project.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse} - */ -public final class ListWorkflowTemplatesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse.class, - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse.Builder.class); - } - - public static final int TEMPLATES_FIELD_NUMBER = 1; - private java.util.List templates_; - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplates(int index) { - return templates_.get(index); - } - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < templates_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, templates_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse) - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse.class, - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse build() { - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse buildPartial() { - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - templatesBuilder_; - - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplates(int index) { - if (templatesBuilder_ == null) { - return templates_.get(index); - } else { - return templatesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setTemplates( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setTemplates( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addTemplates( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder getTemplatesBuilder( - int index) { - return getTemplatesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplatesOrBuilder( - int index) { - if (templatesBuilder_ == null) { - return templates_.get(index); - } else { - return templatesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder addTemplatesBuilder() { - return getTemplatesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder addTemplatesBuilder( - int index) { - return getTemplatesFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. WorkflowTemplates list.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - getTemplatesFieldBuilder() { - if (templatesBuilder_ == null) { - templatesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse) - private static final com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ListWorkflowTemplatesResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponseOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ListWorkflowTemplatesResponseOrBuilder.java deleted file mode 100644 index 507f5e0b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ListWorkflowTemplatesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ListWorkflowTemplatesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getTemplatesList(); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplates(int index); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getTemplatesCount(); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getTemplatesOrBuilderList(); - /** - * - * - *
-   * Output only. WorkflowTemplates list.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowTemplate templates = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.java deleted file mode 100644 index 84ba3611..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LocationName.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. - */ - -package com.google.cloud.dataproc.v1beta2; - -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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class LocationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - 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 = - PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location); - } - - /** Builder for LocationName. */ - public static class Builder { - - private String project; - private String location; - - 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() {} - - private Builder(LocationName locationName) { - project = locationName.project; - location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof LocationName) { - LocationName that = (LocationName) o; - return (this.project.equals(that.project)) && (this.location.equals(that.location)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfig.java deleted file mode 100644 index b2c112e9..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfig.java +++ /dev/null @@ -1,1360 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The runtime logging config of the job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.LoggingConfig} - */ -public final class LoggingConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.LoggingConfig.class, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder.class); - } - - /** - * - * - *
-   * The Log4j level for job execution. When running an
-   * [Apache Hive](http://hive.apache.org/) job, Cloud
-   * Dataproc configures the Hive client to an equivalent verbosity level.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_DriverLogLevelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.ENUM, - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Level> - driverLogLevelsValueConverter = - com.google.protobuf.Internal.MapAdapter.newEnumConverter( - com.google.cloud.dataproc.v1beta2.LoggingConfig.Level.internalGetValueMap(), - com.google.cloud.dataproc.v1beta2.LoggingConfig.Level.UNRECOGNIZED); - - private static final java.util.Map< - java.lang.String, com.google.cloud.dataproc.v1beta2.LoggingConfig.Level> - internalGetAdaptedDriverLogLevelsMap(java.util.Map map) { - return new com.google.protobuf.Internal.MapAdapter< - java.lang.String, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Level getDriverLogLevelsOrDefault( - java.lang.String key, com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.LoggingConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.LoggingConfig) - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.LoggingConfig.class, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_LoggingConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig build() { - com.google.cloud.dataproc.v1beta2.LoggingConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.LoggingConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.LoggingConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.LoggingConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Level getDriverLogLevelsOrDefault( - java.lang.String key, com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - public Builder putDriverLogLevels( - java.lang.String key, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.LoggingConfig) - private static final com.google.cloud.dataproc.v1beta2.LoggingConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.LoggingConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfigOrBuilder.java deleted file mode 100644 index 80b906f8..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/LoggingConfigOrBuilder.java +++ /dev/null @@ -1,156 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface LoggingConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig.Level getDriverLogLevelsOrDefault( - java.lang.String key, com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig.Level> driver_log_levels = 2; - * - */ - int getDriverLogLevelsValueOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedCluster.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedCluster.java deleted file mode 100644 index 7db14357..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedCluster.java +++ /dev/null @@ -1,1331 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Cluster that is managed by the workflow.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ManagedCluster} - */ -public final class ManagedCluster extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ManagedCluster.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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.v1beta2.ClusterConfig config_; - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - * - * @return Whether the config field is set. - */ - @java.lang.Override - public boolean hasConfig() { - return config_ != null; - } - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - * - * @return The config. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterConfig getConfig() { - return config_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance() - : config_; - } - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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; - */ - @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; - */ - @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; - */ - @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; - */ - @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 (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterNameBytes().isEmpty()) { - 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.v1beta2.ManagedCluster)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ManagedCluster other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ManagedCluster} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ManagedCluster) - com.google.cloud.dataproc.v1beta2.ManagedClusterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ManagedCluster.class, - com.google.cloud.dataproc.v1beta2.ManagedCluster.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedCluster getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedCluster build() { - com.google.cloud.dataproc.v1beta2.ManagedCluster result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedCluster buildPartial() { - com.google.cloud.dataproc.v1beta2.ManagedCluster result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ManagedCluster) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ManagedCluster other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ClusterConfig config_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterConfig, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder> - configBuilder_; - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - * - * @return Whether the config field is set. - */ - public boolean hasConfig() { - return configBuilder_ != null || config_ != null; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - * - * @return The config. - */ - public com.google.cloud.dataproc.v1beta2.ClusterConfig getConfig() { - if (configBuilder_ == null) { - return config_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance() - : config_; - } else { - return configBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - public Builder setConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterConfig config = 3; - */ - public Builder setConfig( - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder builderForValue) { - if (configBuilder_ == null) { - config_ = builderForValue.build(); - onChanged(); - } else { - configBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - public Builder mergeConfig(com.google.cloud.dataproc.v1beta2.ClusterConfig value) { - if (configBuilder_ == null) { - if (config_ != null) { - config_ = - com.google.cloud.dataproc.v1beta2.ClusterConfig.newBuilder(config_) - .mergeFrom(value) - .buildPartial(); - } else { - config_ = value; - } - onChanged(); - } else { - configBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - public Builder clearConfig() { - if (configBuilder_ == null) { - config_ = null; - onChanged(); - } else { - config_ = null; - configBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - public com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder getConfigBuilder() { - - onChanged(); - return getConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - public com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder getConfigOrBuilder() { - if (configBuilder_ != null) { - return configBuilder_.getMessageOrBuilder(); - } else { - return config_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterConfig.getDefaultInstance() - : config_; - } - } - /** - * - * - *
-     * Required. The cluster configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterConfig, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.ClusterConfigOrBuilder> - getConfigFieldBuilder() { - if (configBuilder_ == null) { - configBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterConfig, - com.google.cloud.dataproc.v1beta2.ClusterConfig.Builder, - com.google.cloud.dataproc.v1beta2.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; - */ - @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; - */ - @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; - */ - @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; - */ - @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; - */ - 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; - */ - 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; - */ - 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.v1beta2.ManagedCluster) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ManagedCluster) - private static final com.google.cloud.dataproc.v1beta2.ManagedCluster DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ManagedCluster(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedClusterOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedClusterOrBuilder.java deleted file mode 100644 index 33c11754..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedClusterOrBuilder.java +++ /dev/null @@ -1,177 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ManagedClusterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @return The bytes for clusterName. - */ - com.google.protobuf.ByteString getClusterNameBytes(); - - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - * - * @return Whether the config field is set. - */ - boolean hasConfig(); - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - * - * @return The config. - */ - com.google.cloud.dataproc.v1beta2.ClusterConfig getConfig(); - /** - * - * - *
-   * Required. The cluster configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ClusterConfig config = 3; - */ - com.google.cloud.dataproc.v1beta2.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; - */ - 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; - */ - 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; - */ - 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; - */ - 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; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfig.java deleted file mode 100644 index 4440c003..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfig.java +++ /dev/null @@ -1,830 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies the resources used to actively manage an instance group.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ManagedGroupConfig} - */ -public final class ManagedGroupConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.class, - com.google.cloud.dataproc.v1beta2.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 (!getInstanceTemplateNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceTemplateName_); - } - if (!getInstanceGroupManagerNameBytes().isEmpty()) { - 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 (!getInstanceTemplateNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceTemplateName_); - } - if (!getInstanceGroupManagerNameBytes().isEmpty()) { - 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.v1beta2.ManagedGroupConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ManagedGroupConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ManagedGroupConfig) - com.google.cloud.dataproc.v1beta2.ManagedGroupConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.class, - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ManagedGroupConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedGroupConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ManagedGroupConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedGroupConfig build() { - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedGroupConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.ManagedGroupConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ManagedGroupConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ManagedGroupConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ManagedGroupConfig) - private static final com.google.cloud.dataproc.v1beta2.ManagedGroupConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ManagedGroupConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedGroupConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ManagedGroupConfigOrBuilder.java deleted file mode 100644 index ec296064..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ManagedGroupConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/NodeInitializationAction.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/NodeInitializationAction.java deleted file mode 100644 index b93af6ac..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies an executable to run on a fully configured node and a
- * timeout period for executable completion.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.NodeInitializationAction} - */ -public final class NodeInitializationAction extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.class, - com.google.cloud.dataproc.v1beta2.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 (!getExecutableFileBytes().isEmpty()) { - 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 (!getExecutableFileBytes().isEmpty()) { - 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.v1beta2.NodeInitializationAction)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.NodeInitializationAction other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.NodeInitializationAction} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.NodeInitializationAction) - com.google.cloud.dataproc.v1beta2.NodeInitializationActionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.class, - com.google.cloud.dataproc.v1beta2.NodeInitializationAction.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_NodeInitializationAction_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.NodeInitializationAction getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.NodeInitializationAction.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.NodeInitializationAction build() { - com.google.cloud.dataproc.v1beta2.NodeInitializationAction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.NodeInitializationAction buildPartial() { - com.google.cloud.dataproc.v1beta2.NodeInitializationAction result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.NodeInitializationAction) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.NodeInitializationAction other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.NodeInitializationAction) - private static final com.google.cloud.dataproc.v1beta2.NodeInitializationAction DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.NodeInitializationAction(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.NodeInitializationAction getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/NodeInitializationActionOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/NodeInitializationActionOrBuilder.java deleted file mode 100644 index cd091b75..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface NodeInitializationActionOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OperationsProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OperationsProto.java deleted file mode 100644 index 027f4e79..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OperationsProto.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 - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the 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/v1beta2/operations.proto - -package com.google.cloud.dataproc.v1beta2; - -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_v1beta2_ClusterOperationStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_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/v1beta2/operatio" - + "ns.proto\022\035google.cloud.dataproc.v1beta2\032" - + "\037google/protobuf/timestamp.proto\032\034google" - + "/api/annotations.proto\"\372\001\n\026ClusterOperat" - + "ionStatus\022J\n\005state\030\001 \001(\0162;.google.cloud." - + "dataproc.v1beta2.ClusterOperationStatus." - + "State\022\023\n\013inner_state\030\002 \001(\t\022\017\n\007details\030\003 " - + "\001(\t\0224\n\020state_start_time\030\004 \001(\0132\032.google.p" - + "rotobuf.Timestamp\"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\"\237\003\n\030" - + "ClusterOperationMetadata\022\024\n\014cluster_name" - + "\030\007 \001(\t\022\024\n\014cluster_uuid\030\010 \001(\t\022E\n\006status\030\t" - + " \001(\01325.google.cloud.dataproc.v1beta2.Clu" - + "sterOperationStatus\022M\n\016status_history\030\n " - + "\003(\01325.google.cloud.dataproc.v1beta2.Clus" - + "terOperationStatus\022\026\n\016operation_type\030\013 \001" - + "(\t\022\023\n\013description\030\014 \001(\t\022S\n\006labels\030\r \003(\0132" - + "C.google.cloud.dataproc.v1beta2.ClusterO" - + "perationMetadata.LabelsEntry\022\020\n\010warnings" - + "\030\016 \003(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - + "lue\030\002 \001(\t:\0028\001B}\n!com.google.cloud.datapr" - + "oc.v1beta2B\017OperationsProtoP\001ZEgoogle.go" - + "lang.org/genproto/googleapis/cloud/datap" - + "roc/v1beta2;dataprocb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationStatus_descriptor, - new java.lang.String[] { - "State", "InnerState", "Details", "StateStartTime", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_descriptor, - new java.lang.String[] { - "ClusterName", - "ClusterUuid", - "Status", - "StatusHistory", - "OperationType", - "Description", - "Labels", - "Warnings", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterOperationMetadata_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java deleted file mode 100644 index 6cde60d6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJob.java +++ /dev/null @@ -1,3675 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A job executed by the workflow.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.OrderedJob} - */ -public final class OrderedJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.HadoopJob.Builder subBuilder = null; - if (jobTypeCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.HadoopJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 2; - break; - } - case 26: - { - com.google.cloud.dataproc.v1beta2.SparkJob.Builder subBuilder = null; - if (jobTypeCase_ == 3) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.SparkJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.SparkJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 3; - break; - } - case 34: - { - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder subBuilder = null; - if (jobTypeCase_ == 4) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.PySparkJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 4; - break; - } - case 42: - { - com.google.cloud.dataproc.v1beta2.HiveJob.Builder subBuilder = null; - if (jobTypeCase_ == 5) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.HiveJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.HiveJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.HiveJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 5; - break; - } - case 50: - { - com.google.cloud.dataproc.v1beta2.PigJob.Builder subBuilder = null; - if (jobTypeCase_ == 6) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.PigJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.PigJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.PigJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 6; - break; - } - case 58: - { - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder subBuilder = null; - if (jobTypeCase_ == 7) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SparkSqlJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling.Builder subBuilder = null; - if (scheduling_ != null) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob.Builder subBuilder = null; - if (jobTypeCase_ == 11) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.SparkRJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_); - jobType_ = subBuilder.buildPartial(); - } - jobTypeCase_ = 11; - break; - } - case 98: - { - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder subBuilder = null; - if (jobTypeCase_ == 12) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_).toBuilder(); - } - jobType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.PrestoJob.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_OrderedJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.OrderedJob.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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; - /** - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; - * - * @return Whether the hadoopJob field is set. - */ - @java.lang.Override - public boolean hasHadoopJob() { - return jobTypeCase_ == 2; - } - /** - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob() { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - - public static final int SPARK_JOB_FIELD_NUMBER = 3; - /** - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; - * - * @return Whether the sparkJob field is set. - */ - @java.lang.Override - public boolean hasSparkJob() { - return jobTypeCase_ == 3; - } - /** - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob() { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder() { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - - public static final int PYSPARK_JOB_FIELD_NUMBER = 4; - /** - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; - * - * @return Whether the pysparkJob field is set. - */ - @java.lang.Override - public boolean hasPysparkJob() { - return jobTypeCase_ == 4; - } - /** - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob() { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - - public static final int HIVE_JOB_FIELD_NUMBER = 5; - /** - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; - * - * @return Whether the hiveJob field is set. - */ - @java.lang.Override - public boolean hasHiveJob() { - return jobTypeCase_ == 5; - } - /** - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob() { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder() { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - - public static final int PIG_JOB_FIELD_NUMBER = 6; - /** - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; - * - * @return Whether the pigJob field is set. - */ - @java.lang.Override - public boolean hasPigJob() { - return jobTypeCase_ == 6; - } - /** - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob getPigJob() { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder() { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - - public static final int SPARK_R_JOB_FIELD_NUMBER = 11; - /** - * - * - *
-   * Spark R job
-   * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - * - * @return Whether the sparkRJob field is set. - */ - @java.lang.Override - public boolean hasSparkRJob() { - return jobTypeCase_ == 11; - } - /** - * - * - *
-   * Spark R job
-   * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob getSparkRJob() { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - /** - * - * - *
-   * Spark R job
-   * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - - public static final int SPARK_SQL_JOB_FIELD_NUMBER = 7; - /** - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; - * - * @return Whether the sparkSqlJob field is set. - */ - @java.lang.Override - public boolean hasSparkSqlJob() { - return jobTypeCase_ == 7; - } - /** - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob() { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - - public static final int PRESTO_JOB_FIELD_NUMBER = 12; - /** - * - * - *
-   * Presto job
-   * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - * - * @return Whether the prestoJob field is set. - */ - @java.lang.Override - public boolean hasPrestoJob() { - return jobTypeCase_ == 12; - } - /** - * - * - *
-   * Presto job
-   * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob getPrestoJob() { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - /** - * - * - *
-   * Presto job
-   * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobScheduling scheduling_; - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling() { - return scheduling_ == null - ? com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance() - : scheduling_; - } - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getStepIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stepId_); - } - if (jobTypeCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_); - } - if (jobTypeCase_ == 3) { - output.writeMessage(3, (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_); - } - if (jobTypeCase_ == 4) { - output.writeMessage(4, (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_); - } - if (jobTypeCase_ == 5) { - output.writeMessage(5, (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_); - } - if (jobTypeCase_ == 6) { - output.writeMessage(6, (com.google.cloud.dataproc.v1beta2.PigJob) jobType_); - } - if (jobTypeCase_ == 7) { - output.writeMessage(7, (com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob) jobType_); - } - if (jobTypeCase_ == 12) { - output.writeMessage(12, (com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getStepIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stepId_); - } - if (jobTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_); - } - if (jobTypeCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_); - } - if (jobTypeCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_); - } - if (jobTypeCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_); - } - if (jobTypeCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.dataproc.v1beta2.PigJob) jobType_); - } - if (jobTypeCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob) jobType_); - } - if (jobTypeCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.OrderedJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.OrderedJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.OrderedJob) - com.google.cloud.dataproc.v1beta2.OrderedJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_OrderedJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.OrderedJob.class, - com.google.cloud.dataproc.v1beta2.OrderedJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_OrderedJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.OrderedJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.OrderedJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.OrderedJob build() { - com.google.cloud.dataproc.v1beta2.OrderedJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.OrderedJob buildPartial() { - com.google.cloud.dataproc.v1beta2.OrderedJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.OrderedJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.OrderedJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.HadoopJob, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder, - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder> - hadoopJobBuilder_; - /** - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; - * - * @return Whether the hadoopJob field is set. - */ - @java.lang.Override - public boolean hasHadoopJob() { - return jobTypeCase_ == 2; - } - /** - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; - * - * @return The hadoopJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob() { - if (hadoopJobBuilder_ == null) { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 2) { - return hadoopJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - public Builder setHadoopJob(com.google.cloud.dataproc.v1beta2.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - hadoopJobBuilder_.setMessage(value); - } - jobTypeCase_ = 2; - return this; - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - public Builder setHadoopJob( - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder builderForValue) { - if (hadoopJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - hadoopJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 2; - return this; - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - public Builder mergeHadoopJob(com.google.cloud.dataproc.v1beta2.HadoopJob value) { - if (hadoopJobBuilder_ == null) { - if (jobTypeCase_ == 2 - && jobType_ != com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.HadoopJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 2) { - hadoopJobBuilder_.mergeFrom(value); - } - hadoopJobBuilder_.setMessage(value); - } - jobTypeCase_ = 2; - return this; - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - 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; - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - public com.google.cloud.dataproc.v1beta2.HadoopJob.Builder getHadoopJobBuilder() { - return getHadoopJobFieldBuilder().getBuilder(); - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder() { - if ((jobTypeCase_ == 2) && (hadoopJobBuilder_ != null)) { - return hadoopJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HadoopJob, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder, - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder> - getHadoopJobFieldBuilder() { - if (hadoopJobBuilder_ == null) { - if (!(jobTypeCase_ == 2)) { - jobType_ = com.google.cloud.dataproc.v1beta2.HadoopJob.getDefaultInstance(); - } - hadoopJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HadoopJob, - com.google.cloud.dataproc.v1beta2.HadoopJob.Builder, - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.HadoopJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 2; - onChanged(); - ; - return hadoopJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkJob, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder> - sparkJobBuilder_; - /** - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; - * - * @return Whether the sparkJob field is set. - */ - @java.lang.Override - public boolean hasSparkJob() { - return jobTypeCase_ == 3; - } - /** - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; - * - * @return The sparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob() { - if (sparkJobBuilder_ == null) { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 3) { - return sparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - public Builder setSparkJob(com.google.cloud.dataproc.v1beta2.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - sparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 3; - return this; - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - public Builder setSparkJob(com.google.cloud.dataproc.v1beta2.SparkJob.Builder builderForValue) { - if (sparkJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - sparkJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 3; - return this; - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - public Builder mergeSparkJob(com.google.cloud.dataproc.v1beta2.SparkJob value) { - if (sparkJobBuilder_ == null) { - if (jobTypeCase_ == 3 - && jobType_ != com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.SparkJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 3) { - sparkJobBuilder_.mergeFrom(value); - } - sparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 3; - return this; - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - 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; - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - public com.google.cloud.dataproc.v1beta2.SparkJob.Builder getSparkJobBuilder() { - return getSparkJobFieldBuilder().getBuilder(); - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder() { - if ((jobTypeCase_ == 3) && (sparkJobBuilder_ != null)) { - return sparkJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 3) { - return (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkJob, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder> - getSparkJobFieldBuilder() { - if (sparkJobBuilder_ == null) { - if (!(jobTypeCase_ == 3)) { - jobType_ = com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - sparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkJob, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.SparkJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 3; - onChanged(); - ; - return sparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PySparkJob, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder, - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder> - pysparkJobBuilder_; - /** - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; - * - * @return Whether the pysparkJob field is set. - */ - @java.lang.Override - public boolean hasPysparkJob() { - return jobTypeCase_ == 4; - } - /** - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; - * - * @return The pysparkJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob() { - if (pysparkJobBuilder_ == null) { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 4) { - return pysparkJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - public Builder setPysparkJob(com.google.cloud.dataproc.v1beta2.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - pysparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 4; - return this; - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - public Builder setPysparkJob( - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder builderForValue) { - if (pysparkJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - pysparkJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 4; - return this; - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - public Builder mergePysparkJob(com.google.cloud.dataproc.v1beta2.PySparkJob value) { - if (pysparkJobBuilder_ == null) { - if (jobTypeCase_ == 4 - && jobType_ != com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.PySparkJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 4) { - pysparkJobBuilder_.mergeFrom(value); - } - pysparkJobBuilder_.setMessage(value); - } - jobTypeCase_ = 4; - return this; - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - 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; - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - public com.google.cloud.dataproc.v1beta2.PySparkJob.Builder getPysparkJobBuilder() { - return getPysparkJobFieldBuilder().getBuilder(); - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder() { - if ((jobTypeCase_ == 4) && (pysparkJobBuilder_ != null)) { - return pysparkJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 4) { - return (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PySparkJob, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder, - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder> - getPysparkJobFieldBuilder() { - if (pysparkJobBuilder_ == null) { - if (!(jobTypeCase_ == 4)) { - jobType_ = com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - pysparkJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PySparkJob, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder, - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.PySparkJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 4; - onChanged(); - ; - return pysparkJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HiveJob, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder, - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder> - hiveJobBuilder_; - /** - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; - * - * @return Whether the hiveJob field is set. - */ - @java.lang.Override - public boolean hasHiveJob() { - return jobTypeCase_ == 5; - } - /** - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; - * - * @return The hiveJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob() { - if (hiveJobBuilder_ == null) { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 5) { - return hiveJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - public Builder setHiveJob(com.google.cloud.dataproc.v1beta2.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - hiveJobBuilder_.setMessage(value); - } - jobTypeCase_ = 5; - return this; - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - public Builder setHiveJob(com.google.cloud.dataproc.v1beta2.HiveJob.Builder builderForValue) { - if (hiveJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - hiveJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 5; - return this; - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - public Builder mergeHiveJob(com.google.cloud.dataproc.v1beta2.HiveJob value) { - if (hiveJobBuilder_ == null) { - if (jobTypeCase_ == 5 - && jobType_ != com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.HiveJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 5) { - hiveJobBuilder_.mergeFrom(value); - } - hiveJobBuilder_.setMessage(value); - } - jobTypeCase_ = 5; - return this; - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - 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; - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - public com.google.cloud.dataproc.v1beta2.HiveJob.Builder getHiveJobBuilder() { - return getHiveJobFieldBuilder().getBuilder(); - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder() { - if ((jobTypeCase_ == 5) && (hiveJobBuilder_ != null)) { - return hiveJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 5) { - return (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HiveJob, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder, - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder> - getHiveJobFieldBuilder() { - if (hiveJobBuilder_ == null) { - if (!(jobTypeCase_ == 5)) { - jobType_ = com.google.cloud.dataproc.v1beta2.HiveJob.getDefaultInstance(); - } - hiveJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.HiveJob, - com.google.cloud.dataproc.v1beta2.HiveJob.Builder, - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.HiveJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 5; - onChanged(); - ; - return hiveJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PigJob, - com.google.cloud.dataproc.v1beta2.PigJob.Builder, - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder> - pigJobBuilder_; - /** - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; - * - * @return Whether the pigJob field is set. - */ - @java.lang.Override - public boolean hasPigJob() { - return jobTypeCase_ == 6; - } - /** - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; - * - * @return The pigJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob getPigJob() { - if (pigJobBuilder_ == null) { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 6) { - return pigJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - public Builder setPigJob(com.google.cloud.dataproc.v1beta2.PigJob value) { - if (pigJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - pigJobBuilder_.setMessage(value); - } - jobTypeCase_ = 6; - return this; - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - public Builder setPigJob(com.google.cloud.dataproc.v1beta2.PigJob.Builder builderForValue) { - if (pigJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - pigJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 6; - return this; - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - public Builder mergePigJob(com.google.cloud.dataproc.v1beta2.PigJob value) { - if (pigJobBuilder_ == null) { - if (jobTypeCase_ == 6 - && jobType_ != com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.PigJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.PigJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 6) { - pigJobBuilder_.mergeFrom(value); - } - pigJobBuilder_.setMessage(value); - } - jobTypeCase_ = 6; - return this; - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - 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; - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - public com.google.cloud.dataproc.v1beta2.PigJob.Builder getPigJobBuilder() { - return getPigJobFieldBuilder().getBuilder(); - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder() { - if ((jobTypeCase_ == 6) && (pigJobBuilder_ != null)) { - return pigJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 6) { - return (com.google.cloud.dataproc.v1beta2.PigJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PigJob, - com.google.cloud.dataproc.v1beta2.PigJob.Builder, - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder> - getPigJobFieldBuilder() { - if (pigJobBuilder_ == null) { - if (!(jobTypeCase_ == 6)) { - jobType_ = com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - pigJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PigJob, - com.google.cloud.dataproc.v1beta2.PigJob.Builder, - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.PigJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 6; - onChanged(); - ; - return pigJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkRJob, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder> - sparkRJobBuilder_; - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - * - * @return Whether the sparkRJob field is set. - */ - @java.lang.Override - public boolean hasSparkRJob() { - return jobTypeCase_ == 11; - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - * - * @return The sparkRJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob getSparkRJob() { - if (sparkRJobBuilder_ == null) { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 11) { - return sparkRJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - public Builder setSparkRJob(com.google.cloud.dataproc.v1beta2.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - sparkRJobBuilder_.setMessage(value); - } - jobTypeCase_ = 11; - return this; - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - public Builder setSparkRJob( - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder builderForValue) { - if (sparkRJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - sparkRJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 11; - return this; - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - public Builder mergeSparkRJob(com.google.cloud.dataproc.v1beta2.SparkRJob value) { - if (sparkRJobBuilder_ == null) { - if (jobTypeCase_ == 11 - && jobType_ != com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.SparkRJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 11) { - sparkRJobBuilder_.mergeFrom(value); - } - sparkRJobBuilder_.setMessage(value); - } - jobTypeCase_ = 11; - return this; - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - 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; - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - public com.google.cloud.dataproc.v1beta2.SparkRJob.Builder getSparkRJobBuilder() { - return getSparkRJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder getSparkRJobOrBuilder() { - if ((jobTypeCase_ == 11) && (sparkRJobBuilder_ != null)) { - return sparkRJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 11) { - return (com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Spark R job
-     * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkRJob, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder> - getSparkRJobFieldBuilder() { - if (sparkRJobBuilder_ == null) { - if (!(jobTypeCase_ == 11)) { - jobType_ = com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - sparkRJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkRJob, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.SparkRJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 11; - onChanged(); - ; - return sparkRJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkSqlJob, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder> - sparkSqlJobBuilder_; - /** - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; - * - * @return Whether the sparkSqlJob field is set. - */ - @java.lang.Override - public boolean hasSparkSqlJob() { - return jobTypeCase_ == 7; - } - /** - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; - * - * @return The sparkSqlJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob() { - if (sparkSqlJobBuilder_ == null) { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 7) { - return sparkSqlJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - public Builder setSparkSqlJob(com.google.cloud.dataproc.v1beta2.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - sparkSqlJobBuilder_.setMessage(value); - } - jobTypeCase_ = 7; - return this; - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - public Builder setSparkSqlJob( - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder builderForValue) { - if (sparkSqlJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - sparkSqlJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 7; - return this; - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - public Builder mergeSparkSqlJob(com.google.cloud.dataproc.v1beta2.SparkSqlJob value) { - if (sparkSqlJobBuilder_ == null) { - if (jobTypeCase_ == 7 - && jobType_ != com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.SparkSqlJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 7) { - sparkSqlJobBuilder_.mergeFrom(value); - } - sparkSqlJobBuilder_.setMessage(value); - } - jobTypeCase_ = 7; - return this; - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - 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; - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - public com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder getSparkSqlJobBuilder() { - return getSparkSqlJobFieldBuilder().getBuilder(); - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() { - if ((jobTypeCase_ == 7) && (sparkSqlJobBuilder_ != null)) { - return sparkSqlJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 7) { - return (com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - } - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkSqlJob, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder> - getSparkSqlJobFieldBuilder() { - if (sparkSqlJobBuilder_ == null) { - if (!(jobTypeCase_ == 7)) { - jobType_ = com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - sparkSqlJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.SparkSqlJob, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder, - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.SparkSqlJob) jobType_, - getParentForChildren(), - isClean()); - jobType_ = null; - } - jobTypeCase_ = 7; - onChanged(); - ; - return sparkSqlJobBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PrestoJob, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder, - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder> - prestoJobBuilder_; - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - * - * @return Whether the prestoJob field is set. - */ - @java.lang.Override - public boolean hasPrestoJob() { - return jobTypeCase_ == 12; - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - * - * @return The prestoJob. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob getPrestoJob() { - if (prestoJobBuilder_ == null) { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } else { - if (jobTypeCase_ == 12) { - return prestoJobBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - public Builder setPrestoJob(com.google.cloud.dataproc.v1beta2.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - jobType_ = value; - onChanged(); - } else { - prestoJobBuilder_.setMessage(value); - } - jobTypeCase_ = 12; - return this; - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - public Builder setPrestoJob( - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder builderForValue) { - if (prestoJobBuilder_ == null) { - jobType_ = builderForValue.build(); - onChanged(); - } else { - prestoJobBuilder_.setMessage(builderForValue.build()); - } - jobTypeCase_ = 12; - return this; - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - public Builder mergePrestoJob(com.google.cloud.dataproc.v1beta2.PrestoJob value) { - if (prestoJobBuilder_ == null) { - if (jobTypeCase_ == 12 - && jobType_ != com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance()) { - jobType_ = - com.google.cloud.dataproc.v1beta2.PrestoJob.newBuilder( - (com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_) - .mergeFrom(value) - .buildPartial(); - } else { - jobType_ = value; - } - onChanged(); - } else { - if (jobTypeCase_ == 12) { - prestoJobBuilder_.mergeFrom(value); - } - prestoJobBuilder_.setMessage(value); - } - jobTypeCase_ = 12; - return this; - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - 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; - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - public com.google.cloud.dataproc.v1beta2.PrestoJob.Builder getPrestoJobBuilder() { - return getPrestoJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder getPrestoJobOrBuilder() { - if ((jobTypeCase_ == 12) && (prestoJobBuilder_ != null)) { - return prestoJobBuilder_.getMessageOrBuilder(); - } else { - if (jobTypeCase_ == 12) { - return (com.google.cloud.dataproc.v1beta2.PrestoJob) jobType_; - } - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - } - /** - * - * - *
-     * Presto job
-     * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PrestoJob, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder, - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder> - getPrestoJobFieldBuilder() { - if (prestoJobBuilder_ == null) { - if (!(jobTypeCase_ == 12)) { - jobType_ = com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - prestoJobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.PrestoJob, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder, - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobScheduling, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder, - com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder> - schedulingBuilder_; - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - public com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling() { - if (schedulingBuilder_ == null) { - return scheduling_ == null - ? com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance() - : scheduling_; - } else { - return schedulingBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling(com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setScheduling( - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder builderForValue) { - if (schedulingBuilder_ == null) { - scheduling_ = builderForValue.build(); - onChanged(); - } else { - schedulingBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeScheduling(com.google.cloud.dataproc.v1beta2.JobScheduling value) { - if (schedulingBuilder_ == null) { - if (scheduling_ != null) { - scheduling_ = - com.google.cloud.dataproc.v1beta2.JobScheduling.newBuilder(scheduling_) - .mergeFrom(value) - .buildPartial(); - } else { - scheduling_ = value; - } - onChanged(); - } else { - schedulingBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobScheduling.Builder getSchedulingBuilder() { - - onChanged(); - return getSchedulingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder getSchedulingOrBuilder() { - if (schedulingBuilder_ != null) { - return schedulingBuilder_.getMessageOrBuilder(); - } else { - return scheduling_ == null - ? com.google.cloud.dataproc.v1beta2.JobScheduling.getDefaultInstance() - : scheduling_; - } - } - /** - * - * - *
-     * Optional. Job scheduling configuration.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobScheduling, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder, - com.google.cloud.dataproc.v1beta2.JobSchedulingOrBuilder> - getSchedulingFieldBuilder() { - if (schedulingBuilder_ == null) { - schedulingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.JobScheduling, - com.google.cloud.dataproc.v1beta2.JobScheduling.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.OrderedJob) - private static final com.google.cloud.dataproc.v1beta2.OrderedJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.OrderedJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java deleted file mode 100644 index 053134b8..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/OrderedJobOrBuilder.java +++ /dev/null @@ -1,412 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface OrderedJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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(); - - /** - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; - * - * @return Whether the hadoopJob field is set. - */ - boolean hasHadoopJob(); - /** - * .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; - * - * @return The hadoopJob. - */ - com.google.cloud.dataproc.v1beta2.HadoopJob getHadoopJob(); - /** .google.cloud.dataproc.v1beta2.HadoopJob hadoop_job = 2; */ - com.google.cloud.dataproc.v1beta2.HadoopJobOrBuilder getHadoopJobOrBuilder(); - - /** - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; - * - * @return Whether the sparkJob field is set. - */ - boolean hasSparkJob(); - /** - * .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; - * - * @return The sparkJob. - */ - com.google.cloud.dataproc.v1beta2.SparkJob getSparkJob(); - /** .google.cloud.dataproc.v1beta2.SparkJob spark_job = 3; */ - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder getSparkJobOrBuilder(); - - /** - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; - * - * @return Whether the pysparkJob field is set. - */ - boolean hasPysparkJob(); - /** - * .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; - * - * @return The pysparkJob. - */ - com.google.cloud.dataproc.v1beta2.PySparkJob getPysparkJob(); - /** .google.cloud.dataproc.v1beta2.PySparkJob pyspark_job = 4; */ - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder getPysparkJobOrBuilder(); - - /** - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; - * - * @return Whether the hiveJob field is set. - */ - boolean hasHiveJob(); - /** - * .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; - * - * @return The hiveJob. - */ - com.google.cloud.dataproc.v1beta2.HiveJob getHiveJob(); - /** .google.cloud.dataproc.v1beta2.HiveJob hive_job = 5; */ - com.google.cloud.dataproc.v1beta2.HiveJobOrBuilder getHiveJobOrBuilder(); - - /** - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; - * - * @return Whether the pigJob field is set. - */ - boolean hasPigJob(); - /** - * .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; - * - * @return The pigJob. - */ - com.google.cloud.dataproc.v1beta2.PigJob getPigJob(); - /** .google.cloud.dataproc.v1beta2.PigJob pig_job = 6; */ - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder getPigJobOrBuilder(); - - /** - * - * - *
-   * Spark R job
-   * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - * - * @return Whether the sparkRJob field is set. - */ - boolean hasSparkRJob(); - /** - * - * - *
-   * Spark R job
-   * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - * - * @return The sparkRJob. - */ - com.google.cloud.dataproc.v1beta2.SparkRJob getSparkRJob(); - /** - * - * - *
-   * Spark R job
-   * 
- * - * .google.cloud.dataproc.v1beta2.SparkRJob spark_r_job = 11; - */ - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder getSparkRJobOrBuilder(); - - /** - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; - * - * @return Whether the sparkSqlJob field is set. - */ - boolean hasSparkSqlJob(); - /** - * .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; - * - * @return The sparkSqlJob. - */ - com.google.cloud.dataproc.v1beta2.SparkSqlJob getSparkSqlJob(); - /** .google.cloud.dataproc.v1beta2.SparkSqlJob spark_sql_job = 7; */ - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder(); - - /** - * - * - *
-   * Presto job
-   * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - * - * @return Whether the prestoJob field is set. - */ - boolean hasPrestoJob(); - /** - * - * - *
-   * Presto job
-   * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - * - * @return The prestoJob. - */ - com.google.cloud.dataproc.v1beta2.PrestoJob getPrestoJob(); - /** - * - * - *
-   * Presto job
-   * 
- * - * .google.cloud.dataproc.v1beta2.PrestoJob presto_job = 12; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the scheduling field is set. - */ - boolean hasScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The scheduling. - */ - com.google.cloud.dataproc.v1beta2.JobScheduling getScheduling(); - /** - * - * - *
-   * Optional. Job scheduling configuration.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.JobScheduling scheduling = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob.JobTypeCase getJobTypeCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidation.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidation.java deleted file mode 100644 index ff7bc92e..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidation.java +++ /dev/null @@ -1,1152 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Configuration for parameter validation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ParameterValidation} - */ -public final class ParameterValidation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation.Builder subBuilder = null; - if (validationTypeCase_ == 1) { - subBuilder = - ((com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_) - .toBuilder(); - } - validationType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.RegexValidation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_); - validationType_ = subBuilder.buildPartial(); - } - validationTypeCase_ = 1; - break; - } - case 18: - { - com.google.cloud.dataproc.v1beta2.ValueValidation.Builder subBuilder = null; - if (validationTypeCase_ == 2) { - subBuilder = - ((com.google.cloud.dataproc.v1beta2.ValueValidation) validationType_) - .toBuilder(); - } - validationType_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ValueValidation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ParameterValidation.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.RegexValidation regex = 1; - * - * @return The regex. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidation getRegex() { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder getRegexOrBuilder() { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } - - public static final int VALUES_FIELD_NUMBER = 2; - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation values = 2; - * - * @return The values. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidation getValues() { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance(); - } - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder getValuesOrBuilder() { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation) validationType_); - } - if (validationTypeCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation) validationType_); - } - if (validationTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ParameterValidation other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ParameterValidation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ParameterValidation) - com.google.cloud.dataproc.v1beta2.ParameterValidationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ParameterValidation.class, - com.google.cloud.dataproc.v1beta2.ParameterValidation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ParameterValidation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ParameterValidation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ParameterValidation build() { - com.google.cloud.dataproc.v1beta2.ParameterValidation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ParameterValidation buildPartial() { - com.google.cloud.dataproc.v1beta2.ParameterValidation result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ParameterValidation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ParameterValidation other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation, - com.google.cloud.dataproc.v1beta2.RegexValidation.Builder, - com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder> - regexBuilder_; - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation regex = 1; - * - * @return The regex. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidation getRegex() { - if (regexBuilder_ == null) { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } else { - if (validationTypeCase_ == 1) { - return regexBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - */ - public Builder setRegex(com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation regex = 1; - */ - public Builder setRegex( - com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation regex = 1; - */ - public Builder mergeRegex(com.google.cloud.dataproc.v1beta2.RegexValidation value) { - if (regexBuilder_ == null) { - if (validationTypeCase_ == 1 - && validationType_ - != com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance()) { - validationType_ = - com.google.cloud.dataproc.v1beta2.RegexValidation.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.RegexValidation regex = 1; - */ - public com.google.cloud.dataproc.v1beta2.RegexValidation.Builder getRegexBuilder() { - return getRegexFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder getRegexOrBuilder() { - if ((validationTypeCase_ == 1) && (regexBuilder_ != null)) { - return regexBuilder_.getMessageOrBuilder(); - } else { - if (validationTypeCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on regular expressions.
-     * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.RegexValidation, - com.google.cloud.dataproc.v1beta2.RegexValidation.Builder, - com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder> - getRegexFieldBuilder() { - if (regexBuilder_ == null) { - if (!(validationTypeCase_ == 1)) { - validationType_ = com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } - regexBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.RegexValidation, - com.google.cloud.dataproc.v1beta2.RegexValidation.Builder, - com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder>( - (com.google.cloud.dataproc.v1beta2.RegexValidation) validationType_, - getParentForChildren(), - isClean()); - validationType_ = null; - } - validationTypeCase_ = 1; - onChanged(); - ; - return regexBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ValueValidation, - com.google.cloud.dataproc.v1beta2.ValueValidation.Builder, - com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder> - valuesBuilder_; - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation values = 2; - * - * @return The values. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidation getValues() { - if (valuesBuilder_ == null) { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance(); - } else { - if (validationTypeCase_ == 2) { - return valuesBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - */ - public Builder setValues(com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation values = 2; - */ - public Builder setValues( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation values = 2; - */ - public Builder mergeValues(com.google.cloud.dataproc.v1beta2.ValueValidation value) { - if (valuesBuilder_ == null) { - if (validationTypeCase_ == 2 - && validationType_ - != com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance()) { - validationType_ = - com.google.cloud.dataproc.v1beta2.ValueValidation.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ValueValidation values = 2; - */ - public com.google.cloud.dataproc.v1beta2.ValueValidation.Builder getValuesBuilder() { - return getValuesFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder getValuesOrBuilder() { - if ((validationTypeCase_ == 2) && (valuesBuilder_ != null)) { - return valuesBuilder_.getMessageOrBuilder(); - } else { - if (validationTypeCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ValueValidation) validationType_; - } - return com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Validation based on a list of allowed values.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ValueValidation, - com.google.cloud.dataproc.v1beta2.ValueValidation.Builder, - com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - if (!(validationTypeCase_ == 2)) { - validationType_ = com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance(); - } - valuesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ValueValidation, - com.google.cloud.dataproc.v1beta2.ValueValidation.Builder, - com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ParameterValidation) - private static final com.google.cloud.dataproc.v1beta2.ParameterValidation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ParameterValidation(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidationOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ParameterValidationOrBuilder.java deleted file mode 100644 index ce7b6719..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ParameterValidationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ParameterValidation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - * - * @return Whether the regex field is set. - */ - boolean hasRegex(); - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - * - * @return The regex. - */ - com.google.cloud.dataproc.v1beta2.RegexValidation getRegex(); - /** - * - * - *
-   * Validation based on regular expressions.
-   * 
- * - * .google.cloud.dataproc.v1beta2.RegexValidation regex = 1; - */ - com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder getRegexOrBuilder(); - - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - * - * @return Whether the values field is set. - */ - boolean hasValues(); - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - * - * @return The values. - */ - com.google.cloud.dataproc.v1beta2.ValueValidation getValues(); - /** - * - * - *
-   * Validation based on a list of allowed values.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ValueValidation values = 2; - */ - com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder getValuesOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.ParameterValidation.ValidationTypeCase - getValidationTypeCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJob.java deleted file mode 100644 index daa251e0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJob.java +++ /dev/null @@ -1,2441 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc job for running [Apache Pig](https://pig.apache.org/)
- * queries on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.PigJob} - */ -public final class PigJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PigJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.PigJob.class, - com.google.cloud.dataproc.v1beta2.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 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.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.PigJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.PigJob other = (com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.PigJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.PigJob) - com.google.cloud.dataproc.v1beta2.PigJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PigJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.PigJob.class, - com.google.cloud.dataproc.v1beta2.PigJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PigJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.PigJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob build() { - com.google.cloud.dataproc.v1beta2.PigJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PigJob buildPartial() { - com.google.cloud.dataproc.v1beta2.PigJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.PigJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.PigJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 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.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList( - com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1beta2.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1beta2.QueryList.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1beta2.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.PigJob) - private static final com.google.cloud.dataproc.v1beta2.PigJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.PigJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PigJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJobOrBuilder.java deleted file mode 100644 index 620719a0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PigJobOrBuilder.java +++ /dev/null @@ -1,336 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface PigJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.PigJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.v1beta2.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1beta2.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.PigJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJob.java deleted file mode 100644 index 014d0f89..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJob.java +++ /dev/null @@ -1,2275 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.PrestoJob} - */ -public final class PrestoJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PrestoJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.PrestoJob.class, - com.google.cloud.dataproc.v1beta2.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 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.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList) queries_); - } - if (continueOnFailure_ != false) { - output.writeBool(3, continueOnFailure_); - } - if (!getOutputFormatBytes().isEmpty()) { - 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.v1beta2.QueryList) queries_); - } - if (continueOnFailure_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, continueOnFailure_); - } - if (!getOutputFormatBytes().isEmpty()) { - 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.v1beta2.PrestoJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.PrestoJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.PrestoJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.PrestoJob) - com.google.cloud.dataproc.v1beta2.PrestoJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PrestoJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.PrestoJob.class, - com.google.cloud.dataproc.v1beta2.PrestoJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PrestoJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.PrestoJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob build() { - com.google.cloud.dataproc.v1beta2.PrestoJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PrestoJob buildPartial() { - com.google.cloud.dataproc.v1beta2.PrestoJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.PrestoJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.PrestoJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 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.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList( - com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1beta2.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1beta2.QueryList.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1beta2.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.PrestoJob) - private static final com.google.cloud.dataproc.v1beta2.PrestoJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.PrestoJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PrestoJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJobOrBuilder.java deleted file mode 100644 index 371c7b70..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PrestoJobOrBuilder.java +++ /dev/null @@ -1,290 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface PrestoJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.PrestoJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.v1beta2.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1beta2.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.PrestoJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJob.java deleted file mode 100644 index 27a1ad60..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJob.java +++ /dev/null @@ -1,2781 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.PySparkJob} - */ -public final class PySparkJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PySparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.PySparkJob.class, - com.google.cloud.dataproc.v1beta2.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 copied to the working directory of
-   * Python 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 URIs of files to be copied to the working directory of
-   * Python 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 URIs of files to be copied to the working directory of
-   * Python 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 URIs of files to be copied to the working directory of
-   * Python 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
-   * .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 in the working directory of
-   * .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 in the working directory of
-   * .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 in the working directory of
-   * .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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getMainPythonFileUriBytes().isEmpty()) { - 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 (!getMainPythonFileUriBytes().isEmpty()) { - 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.v1beta2.PySparkJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.PySparkJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.PySparkJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.PySparkJob) - com.google.cloud.dataproc.v1beta2.PySparkJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PySparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.PySparkJob.class, - com.google.cloud.dataproc.v1beta2.PySparkJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_PySparkJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.PySparkJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob build() { - com.google.cloud.dataproc.v1beta2.PySparkJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.PySparkJob buildPartial() { - com.google.cloud.dataproc.v1beta2.PySparkJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.PySparkJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.PySparkJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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 URIs of files to be copied to the working directory of
-     * Python 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_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. HCFS URIs of files to be copied to the working directory of
-     * Python 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_ & 0x00000010) != 0)) { - archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_); - bitField0_ |= 0x00000010; - } - } - /** - * - * - *
-     * Optional. HCFS URIs of archives to be extracted in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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 in the working directory of
-     * .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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.PySparkJob) - private static final com.google.cloud.dataproc.v1beta2.PySparkJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.PySparkJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.PySparkJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJobOrBuilder.java deleted file mode 100644 index 1f52a82e..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/PySparkJobOrBuilder.java +++ /dev/null @@ -1,446 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface PySparkJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 copied to the working directory of
-   * Python 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 URIs of files to be copied to the working directory of
-   * Python 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 URIs of files to be copied to the working directory of
-   * Python 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 URIs of files to be copied to the working directory of
-   * Python 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
-   * .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 in the working directory of
-   * .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 in the working directory of
-   * .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 in the working directory of
-   * .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.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryList.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryList.java deleted file mode 100644 index d4b709c6..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryList.java +++ /dev/null @@ -1,891 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A list of queries to run on a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.QueryList} - */ -public final class QueryList extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_QueryList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_QueryList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.QueryList.class, - com.google.cloud.dataproc.v1beta2.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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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.v1beta2.QueryList)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.QueryList other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.QueryList} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.QueryList) - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_QueryList_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_QueryList_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.QueryList.class, - com.google.cloud.dataproc.v1beta2.QueryList.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_QueryList_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList build() { - com.google.cloud.dataproc.v1beta2.QueryList result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList buildPartial() { - com.google.cloud.dataproc.v1beta2.QueryList result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.QueryList) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.QueryList other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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 terminate a query
-     * with a semicolon. Multiple queries can be specified in one string
-     * by separating each with a semicolon. Here is an example of an Cloud
-     * 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.v1beta2.QueryList) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.QueryList) - private static final com.google.cloud.dataproc.v1beta2.QueryList DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.QueryList(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryListOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/QueryListOrBuilder.java deleted file mode 100644 index 2292b755..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface QueryListOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.QueryList) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The queries to execute. You do not need to terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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 terminate a query
-   * with a semicolon. Multiple queries can be specified in one string
-   * by separating each with a semicolon. Here is an example of an Cloud
-   * 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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidation.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidation.java deleted file mode 100644 index 014fc678..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidation.java +++ /dev/null @@ -1,763 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Validation based on regular expressions.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.RegexValidation} - */ -public final class RegexValidation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_RegexValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_RegexValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.RegexValidation.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.RegexValidation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.RegexValidation other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.RegexValidation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.RegexValidation) - com.google.cloud.dataproc.v1beta2.RegexValidationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_RegexValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_RegexValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.RegexValidation.class, - com.google.cloud.dataproc.v1beta2.RegexValidation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_RegexValidation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.RegexValidation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidation build() { - com.google.cloud.dataproc.v1beta2.RegexValidation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.RegexValidation buildPartial() { - com.google.cloud.dataproc.v1beta2.RegexValidation result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.RegexValidation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.RegexValidation other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.RegexValidation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.RegexValidation) - private static final com.google.cloud.dataproc.v1beta2.RegexValidation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.RegexValidation(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.RegexValidation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidationOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegexValidationOrBuilder.java deleted file mode 100644 index 723d9744..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface RegexValidationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegionName.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegionName.java deleted file mode 100644 index 8d814573..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/RegionName.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. - */ - -package com.google.cloud.dataproc.v1beta2; - -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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class RegionName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/regions/{region}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String region; - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private RegionName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - } - - 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 = - PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("region", region); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "region", region); - } - - /** Builder for RegionName. */ - public static class Builder { - - private String project; - private String region; - - 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() {} - - private Builder(RegionName regionName) { - project = regionName.project; - region = regionName.region; - } - - public RegionName build() { - return new RegionName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof RegionName) { - RegionName that = (RegionName) o; - return (this.project.equals(that.project)) && (this.region.equals(that.region)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= region.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinity.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinity.java deleted file mode 100644 index dc05e6e1..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinity.java +++ /dev/null @@ -1,1258 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Reservation Affinity for consuming Zonal reservation.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ReservationAffinity} - */ -public final class ReservationAffinity extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ReservationAffinity.class, - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Builder.class); - } - - /** - * - * - *
-   * Indicates whether to consume capacity from an reservation or not.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ReservationAffinity.Type) - } - - public static final int CONSUME_RESERVATION_TYPE_FIELD_NUMBER = 1; - private int consumeReservationType_; - /** - * - * - *
-   * Optional. Type of reservation to consume
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The consumeReservationType. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type getConsumeReservationType() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type result = - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type.valueOf(consumeReservationType_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity.Type.TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, consumeReservationType_); - } - if (!getKeyBytes().isEmpty()) { - 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.v1beta2.ReservationAffinity.Type.TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, consumeReservationType_); - } - if (!getKeyBytes().isEmpty()) { - 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.v1beta2.ReservationAffinity)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ReservationAffinity other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ReservationAffinity} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ReservationAffinity) - com.google.cloud.dataproc.v1beta2.ReservationAffinityOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ReservationAffinity.class, - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_ReservationAffinity_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinity getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ReservationAffinity.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinity build() { - com.google.cloud.dataproc.v1beta2.ReservationAffinity result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinity buildPartial() { - com.google.cloud.dataproc.v1beta2.ReservationAffinity result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ReservationAffinity) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ReservationAffinity other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The consumeReservationType. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type getConsumeReservationType() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type result = - com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type.valueOf( - consumeReservationType_); - return result == null - ? com.google.cloud.dataproc.v1beta2.ReservationAffinity.Type.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity.Type value) { - if (value == null) { - throw new NullPointerException(); - } - - consumeReservationType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of reservation to consume
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ReservationAffinity) - private static final com.google.cloud.dataproc.v1beta2.ReservationAffinity DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ReservationAffinity(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinityOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ReservationAffinityOrBuilder.java deleted file mode 100644 index b48c85cd..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ReservationAffinityOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ReservationAffinity) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Type of reservation to consume
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The consumeReservationType. - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfig.java deleted file mode 100644 index 193496c9..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfig.java +++ /dev/null @@ -1,733 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Security related configuration, including encryption, Kerberos, etc.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SecurityConfig} - */ -public final class SecurityConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.KerberosConfig.Builder subBuilder = null; - if (kerberosConfig_ != null) { - subBuilder = kerberosConfig_.toBuilder(); - } - kerberosConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.KerberosConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kerberosConfig_); - kerberosConfig_ = 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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SecurityConfig.class, - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder.class); - } - - public static final int KERBEROS_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1beta2.KerberosConfig kerberosConfig_; - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - * - * @return Whether the kerberosConfig field is set. - */ - @java.lang.Override - public boolean hasKerberosConfig() { - return kerberosConfig_ != null; - } - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - * - * @return The kerberosConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.KerberosConfig getKerberosConfig() { - return kerberosConfig_ == null - ? com.google.cloud.dataproc.v1beta2.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - return getKerberosConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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()); - } - 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()); - } - 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.v1beta2.SecurityConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.SecurityConfig other = - (com.google.cloud.dataproc.v1beta2.SecurityConfig) obj; - - if (hasKerberosConfig() != other.hasKerberosConfig()) return false; - if (hasKerberosConfig()) { - if (!getKerberosConfig().equals(other.getKerberosConfig())) 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(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.SecurityConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SecurityConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SecurityConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SecurityConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SecurityConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.SecurityConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.SecurityConfig) - com.google.cloud.dataproc.v1beta2.SecurityConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SecurityConfig.class, - com.google.cloud.dataproc.v1beta2.SecurityConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SecurityConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SecurityConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.SecurityConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SecurityConfig build() { - com.google.cloud.dataproc.v1beta2.SecurityConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SecurityConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.SecurityConfig result = - new com.google.cloud.dataproc.v1beta2.SecurityConfig(this); - if (kerberosConfigBuilder_ == null) { - result.kerberosConfig_ = kerberosConfig_; - } else { - result.kerberosConfig_ = kerberosConfigBuilder_.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.v1beta2.SecurityConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.SecurityConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.SecurityConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.SecurityConfig.getDefaultInstance()) - return this; - if (other.hasKerberosConfig()) { - mergeKerberosConfig(other.getKerberosConfig()); - } - 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.v1beta2.SecurityConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.SecurityConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1beta2.KerberosConfig kerberosConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.KerberosConfig, - com.google.cloud.dataproc.v1beta2.KerberosConfig.Builder, - com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder> - kerberosConfigBuilder_; - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - * - * @return Whether the kerberosConfig field is set. - */ - public boolean hasKerberosConfig() { - return kerberosConfigBuilder_ != null || kerberosConfig_ != null; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - * - * @return The kerberosConfig. - */ - public com.google.cloud.dataproc.v1beta2.KerberosConfig getKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - return kerberosConfig_ == null - ? com.google.cloud.dataproc.v1beta2.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } else { - return kerberosConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - public Builder setKerberosConfig(com.google.cloud.dataproc.v1beta2.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - kerberosConfig_ = value; - onChanged(); - } else { - kerberosConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - public Builder setKerberosConfig( - com.google.cloud.dataproc.v1beta2.KerberosConfig.Builder builderForValue) { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = builderForValue.build(); - onChanged(); - } else { - kerberosConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - public Builder mergeKerberosConfig(com.google.cloud.dataproc.v1beta2.KerberosConfig value) { - if (kerberosConfigBuilder_ == null) { - if (kerberosConfig_ != null) { - kerberosConfig_ = - com.google.cloud.dataproc.v1beta2.KerberosConfig.newBuilder(kerberosConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - kerberosConfig_ = value; - } - onChanged(); - } else { - kerberosConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - public Builder clearKerberosConfig() { - if (kerberosConfigBuilder_ == null) { - kerberosConfig_ = null; - onChanged(); - } else { - kerberosConfig_ = null; - kerberosConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - public com.google.cloud.dataproc.v1beta2.KerberosConfig.Builder getKerberosConfigBuilder() { - - onChanged(); - return getKerberosConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - public com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder getKerberosConfigOrBuilder() { - if (kerberosConfigBuilder_ != null) { - return kerberosConfigBuilder_.getMessageOrBuilder(); - } else { - return kerberosConfig_ == null - ? com.google.cloud.dataproc.v1beta2.KerberosConfig.getDefaultInstance() - : kerberosConfig_; - } - } - /** - * - * - *
-     * Kerberos related configuration.
-     * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.KerberosConfig, - com.google.cloud.dataproc.v1beta2.KerberosConfig.Builder, - com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder> - getKerberosConfigFieldBuilder() { - if (kerberosConfigBuilder_ == null) { - kerberosConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.KerberosConfig, - com.google.cloud.dataproc.v1beta2.KerberosConfig.Builder, - com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder>( - getKerberosConfig(), getParentForChildren(), isClean()); - kerberosConfig_ = null; - } - return kerberosConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.SecurityConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.SecurityConfig) - private static final com.google.cloud.dataproc.v1beta2.SecurityConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.SecurityConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SecurityConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfigOrBuilder.java deleted file mode 100644 index a3864ea4..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SecurityConfigOrBuilder.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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface SecurityConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.SecurityConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - * - * @return Whether the kerberosConfig field is set. - */ - boolean hasKerberosConfig(); - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - * - * @return The kerberosConfig. - */ - com.google.cloud.dataproc.v1beta2.KerberosConfig getKerberosConfig(); - /** - * - * - *
-   * Kerberos related configuration.
-   * 
- * - * .google.cloud.dataproc.v1beta2.KerberosConfig kerberos_config = 1; - */ - com.google.cloud.dataproc.v1beta2.KerberosConfigOrBuilder getKerberosConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SharedProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SharedProto.java deleted file mode 100644 index 58e8dbe5..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SharedProto.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/v1beta2/shared.proto - -package com.google.cloud.dataproc.v1beta2; - -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); - } - - 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/v1beta2/shared.p" - + "roto\022\035google.cloud.dataproc.v1beta2\032\034goo" - + "gle/api/annotations.proto*\302\001\n\tComponent\022" - + "\031\n\025COMPONENT_UNSPECIFIED\020\000\022\014\n\010ANACONDA\020\005" - + "\022\n\n\006DOCKER\020\r\022\t\n\005DRUID\020\t\022\t\n\005FLINK\020\016\022\020\n\014HI" - + "VE_WEBHCAT\020\003\022\013\n\007JUPYTER\020\001\022\014\n\010KERBEROS\020\007\022" - + "\n\n\006PRESTO\020\006\022\n\n\006RANGER\020\014\022\010\n\004SOLR\020\n\022\014\n\010ZEP" - + "PELIN\020\004\022\r\n\tZOOKEEPER\020\010By\n!com.google.clo" - + "ud.dataproc.v1beta2B\013SharedProtoP\001ZEgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "dataproc/v1beta2;dataprocb\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfig.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfig.java deleted file mode 100644 index 5eaad162..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfig.java +++ /dev/null @@ -1,1565 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies the selection and config of software inside the cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SoftwareConfig} - */ -public final class SoftwareConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SoftwareConfig.class, - com.google.cloud.dataproc.v1beta2.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_cloud_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_cloud_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.Component> - optionalComponents_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.cloud.dataproc.v1beta2.Component>() { - public com.google.cloud.dataproc.v1beta2.Component convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.Component result = - com.google.cloud.dataproc.v1beta2.Component.valueOf(from); - return result == null - ? com.google.cloud.dataproc.v1beta2.Component.UNRECOGNIZED - : result; - } - }; - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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.v1beta2.Component>( - optionalComponents_, optionalComponents_converter_); - } - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return The count of optionalComponents. - */ - @java.lang.Override - public int getOptionalComponentsCount() { - return optionalComponents_.size(); - } - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @param index The index of the element to return. - * @return The optionalComponents at the given index. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Component getOptionalComponents(int index) { - return optionalComponents_converter_.convert(optionalComponents_.get(index)); - } - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return A list containing the enum numeric values on the wire for optionalComponents. - */ - @java.lang.Override - public java.util.List getOptionalComponentsValueList() { - return optionalComponents_; - } - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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 (!getImageVersionBytes().isEmpty()) { - 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 (!getImageVersionBytes().isEmpty()) { - 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.v1beta2.SoftwareConfig)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.SoftwareConfig other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.SoftwareConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.SoftwareConfig) - com.google.cloud.dataproc.v1beta2.SoftwareConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SoftwareConfig.class, - com.google.cloud.dataproc.v1beta2.SoftwareConfig.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_SoftwareConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SoftwareConfig getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.SoftwareConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SoftwareConfig build() { - com.google.cloud.dataproc.v1beta2.SoftwareConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SoftwareConfig buildPartial() { - com.google.cloud.dataproc.v1beta2.SoftwareConfig result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.SoftwareConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.SoftwareConfig other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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_cloud_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_cloud_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_cloud_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_cloud_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_cloud_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; - } - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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.v1beta2.Component>( - optionalComponents_, optionalComponents_converter_); - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return The count of optionalComponents. - */ - public int getOptionalComponentsCount() { - return optionalComponents_.size(); - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @param index The index of the element to return. - * @return The optionalComponents at the given index. - */ - public com.google.cloud.dataproc.v1beta2.Component getOptionalComponents(int index) { - return optionalComponents_converter_.convert(optionalComponents_.get(index)); - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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.v1beta2.Component value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalComponentsIsMutable(); - optionalComponents_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @param value The optionalComponents to add. - * @return This builder for chaining. - */ - public Builder addOptionalComponents(com.google.cloud.dataproc.v1beta2.Component value) { - if (value == null) { - throw new NullPointerException(); - } - ensureOptionalComponentsIsMutable(); - optionalComponents_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @param values The optionalComponents to add. - * @return This builder for chaining. - */ - public Builder addAllOptionalComponents( - java.lang.Iterable values) { - ensureOptionalComponentsIsMutable(); - for (com.google.cloud.dataproc.v1beta2.Component value : values) { - optionalComponents_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return This builder for chaining. - */ - public Builder clearOptionalComponents() { - optionalComponents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return A list containing the enum numeric values on the wire for optionalComponents. - */ - public java.util.List getOptionalComponentsValueList() { - return java.util.Collections.unmodifiableList(optionalComponents_); - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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); - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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; - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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; - } - /** - * - * - *
-     * The set of optional components to activate on the cluster.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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.v1beta2.SoftwareConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.SoftwareConfig) - private static final com.google.cloud.dataproc.v1beta2.SoftwareConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.SoftwareConfig(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SoftwareConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfigOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfigOrBuilder.java deleted file mode 100644 index 6b2f2fef..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SoftwareConfigOrBuilder.java +++ /dev/null @@ -1,254 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface SoftwareConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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_cloud_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_cloud_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); - - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return A list containing the optionalComponents. - */ - java.util.List getOptionalComponentsList(); - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return The count of optionalComponents. - */ - int getOptionalComponentsCount(); - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @param index The index of the element to return. - * @return The optionalComponents at the given index. - */ - com.google.cloud.dataproc.v1beta2.Component getOptionalComponents(int index); - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @return A list containing the enum numeric values on the wire for optionalComponents. - */ - java.util.List getOptionalComponentsValueList(); - /** - * - * - *
-   * The set of optional components to activate on the cluster.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.Component optional_components = 3; - * - * @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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJob.java deleted file mode 100644 index 8dec085f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJob.java +++ /dev/null @@ -1,2821 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc job for running [Apache Spark](http://spark.apache.org/)
- * applications on YARN.
- * 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`.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SparkJob} - */ -public final class SparkJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SparkJob.class, - com.google.cloud.dataproc.v1beta2.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 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 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 copied to the working directory of
-   * Spark 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 URIs of files to be copied to the working directory of
-   * Spark 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 URIs of files to be copied to the working directory of
-   * Spark 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 URIs of files to be copied to the working directory of
-   * Spark 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 Spark drivers and tasks. 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 in the working directory
-   * of Spark drivers and tasks. 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 in the working directory
-   * of Spark drivers and tasks. 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 in the working directory
-   * of Spark drivers and tasks. 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.SparkJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.
-   * 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`.
-   * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SparkJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.SparkJob) - com.google.cloud.dataproc.v1beta2.SparkJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SparkJob.class, - com.google.cloud.dataproc.v1beta2.SparkJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.SparkJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob build() { - com.google.cloud.dataproc.v1beta2.SparkJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkJob buildPartial() { - com.google.cloud.dataproc.v1beta2.SparkJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.SparkJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.SparkJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 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 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 copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 URIs of files to be copied to the working directory of
-     * Spark 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 Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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 in the working directory
-     * of Spark drivers and tasks. 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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.SparkJob) - private static final com.google.cloud.dataproc.v1beta2.SparkJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.SparkJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJobOrBuilder.java deleted file mode 100644 index 9a524b6e..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkJobOrBuilder.java +++ /dev/null @@ -1,422 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface SparkJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.SparkJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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 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 copied to the working directory of
-   * Spark 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 URIs of files to be copied to the working directory of
-   * Spark 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 URIs of files to be copied to the working directory of
-   * Spark 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 URIs of files to be copied to the working directory of
-   * Spark 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 Spark drivers and tasks. 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 in the working directory
-   * of Spark drivers and tasks. 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 in the working directory
-   * of Spark drivers and tasks. 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 in the working directory
-   * of Spark drivers and tasks. 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.v1beta2.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.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.SparkJob.DriverCase getDriverCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJob.java deleted file mode 100644 index f56d0518..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJob.java +++ /dev/null @@ -1,2214 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc job for running
- * [Apache SparkR](https://spark.apache.org/docs/latest/sparkr.html)
- * applications on YARN.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SparkRJob} - */ -public final class SparkRJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkRJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SparkRJob.class, - com.google.cloud.dataproc.v1beta2.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 copied to the working directory of
-   * R drivers and distributed tasks. 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 copied to the working directory of
-   * R drivers and distributed tasks. 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 copied to the working directory of
-   * R drivers and distributed tasks. 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 copied to the working directory of
-   * R drivers and distributed tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getMainRFileUriBytes().isEmpty()) { - 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 (!getMainRFileUriBytes().isEmpty()) { - 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.v1beta2.SparkRJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.SparkRJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.SparkRJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.SparkRJob) - com.google.cloud.dataproc.v1beta2.SparkRJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkRJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SparkRJob.class, - com.google.cloud.dataproc.v1beta2.SparkRJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkRJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.SparkRJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob build() { - com.google.cloud.dataproc.v1beta2.SparkRJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkRJob buildPartial() { - com.google.cloud.dataproc.v1beta2.SparkRJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.SparkRJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.SparkRJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 copied to the working directory of
-     * R drivers and distributed tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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 in the working directory of
-     * Spark drivers and tasks. 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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.SparkRJob) - private static final com.google.cloud.dataproc.v1beta2.SparkRJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.SparkRJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkRJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkRJobOrBuilder.java deleted file mode 100644 index 03957053..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface SparkRJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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 copied to the working directory of
-   * R drivers and distributed tasks. 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 copied to the working directory of
-   * R drivers and distributed tasks. 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 copied to the working directory of
-   * R drivers and distributed tasks. 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 copied to the working directory of
-   * R drivers and distributed tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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 in the working directory of
-   * Spark drivers and tasks. 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.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJob.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJob.java deleted file mode 100644 index 31140d3c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJob.java +++ /dev/null @@ -1,2320 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc job for running [Apache Spark
- * SQL](http://spark.apache.org/sql/) queries.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SparkSqlJob} - */ -public final class SparkSqlJob extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.QueryList.Builder subBuilder = null; - if (queriesCase_ == 2) { - subBuilder = ((com.google.cloud.dataproc.v1beta2.QueryList) queries_).toBuilder(); - } - queries_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.QueryList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig.Builder subBuilder = null; - if (loggingConfig_ != null) { - subBuilder = loggingConfig_.toBuilder(); - } - loggingConfig_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SparkSqlJob.class, - com.google.cloud.dataproc.v1beta2.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 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.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.LoggingConfig loggingConfig_; - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.SparkSqlJob)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.SparkSqlJob other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.SparkSqlJob} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.SparkSqlJob) - com.google.cloud.dataproc.v1beta2.SparkSqlJobOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SparkSqlJob.class, - com.google.cloud.dataproc.v1beta2.SparkSqlJob.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SparkSqlJob_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.SparkSqlJob.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob build() { - com.google.cloud.dataproc.v1beta2.SparkSqlJob result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SparkSqlJob buildPartial() { - com.google.cloud.dataproc.v1beta2.SparkSqlJob result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.SparkSqlJob) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.SparkSqlJob other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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 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.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - queryListBuilder_; - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryList getQueryList() { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } else { - if (queriesCase_ == 2) { - return queryListBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList(com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder setQueryList( - com.google.cloud.dataproc.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public Builder mergeQueryList(com.google.cloud.dataproc.v1beta2.QueryList value) { - if (queryListBuilder_ == null) { - if (queriesCase_ == 2 - && queries_ != com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance()) { - queries_ = - com.google.cloud.dataproc.v1beta2.QueryList.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.QueryList query_list = 2; - */ - public com.google.cloud.dataproc.v1beta2.QueryList.Builder getQueryListBuilder() { - return getQueryListFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.QueryListOrBuilder getQueryListOrBuilder() { - if ((queriesCase_ == 2) && (queryListBuilder_ != null)) { - return queryListBuilder_.getMessageOrBuilder(); - } else { - if (queriesCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.QueryList) queries_; - } - return com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - } - /** - * - * - *
-     * A list of queries.
-     * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder> - getQueryListFieldBuilder() { - if (queryListBuilder_ == null) { - if (!(queriesCase_ == 2)) { - queries_ = com.google.cloud.dataproc.v1beta2.QueryList.getDefaultInstance(); - } - queryListBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.QueryList, - com.google.cloud.dataproc.v1beta2.QueryList.Builder, - com.google.cloud.dataproc.v1beta2.QueryListOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig loggingConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - loggingConfigBuilder_; - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig() { - if (loggingConfigBuilder_ == null) { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } else { - return loggingConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig(com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setLoggingConfig( - com.google.cloud.dataproc.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1beta2.LoggingConfig value) { - if (loggingConfigBuilder_ == null) { - if (loggingConfig_ != null) { - loggingConfig_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder getLoggingConfigBuilder() { - - onChanged(); - return getLoggingConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder() { - if (loggingConfigBuilder_ != null) { - return loggingConfigBuilder_.getMessageOrBuilder(); - } else { - return loggingConfig_ == null - ? com.google.cloud.dataproc.v1beta2.LoggingConfig.getDefaultInstance() - : loggingConfig_; - } - } - /** - * - * - *
-     * Optional. The runtime log config for job execution.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder> - getLoggingConfigFieldBuilder() { - if (loggingConfigBuilder_ == null) { - loggingConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.LoggingConfig, - com.google.cloud.dataproc.v1beta2.LoggingConfig.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.SparkSqlJob) - private static final com.google.cloud.dataproc.v1beta2.SparkSqlJob DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.SparkSqlJob(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SparkSqlJob getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJobOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJobOrBuilder.java deleted file mode 100644 index c28466db..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SparkSqlJobOrBuilder.java +++ /dev/null @@ -1,312 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface SparkSqlJobOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.SparkSqlJob) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * 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.v1beta2.QueryList query_list = 2; - * - * @return Whether the queryList field is set. - */ - boolean hasQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - * - * @return The queryList. - */ - com.google.cloud.dataproc.v1beta2.QueryList getQueryList(); - /** - * - * - *
-   * A list of queries.
-   * 
- * - * .google.cloud.dataproc.v1beta2.QueryList query_list = 2; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The loggingConfig. - */ - com.google.cloud.dataproc.v1beta2.LoggingConfig getLoggingConfig(); - /** - * - * - *
-   * Optional. The runtime log config for job execution.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.LoggingConfig logging_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.LoggingConfigOrBuilder getLoggingConfigOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.SparkSqlJob.QueriesCase getQueriesCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequest.java deleted file mode 100644 index 67ae1c9c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequest.java +++ /dev/null @@ -1,1340 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to submit a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.SubmitJobRequest} - */ -public final class SubmitJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.Job.Builder subBuilder = null; - if (job_ != null) { - subBuilder = job_.toBuilder(); - } - job_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SubmitJobRequest.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job_; - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The job. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Job getJob() { - return job_ == null ? com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance() : job_; - } - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-   * id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-   * id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (job_ != null) { - output.writeMessage(2, getJob()); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (job_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getJob()); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, region_); - } - if (!getRequestIdBytes().isEmpty()) { - 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.v1beta2.SubmitJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.SubmitJobRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.SubmitJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.SubmitJobRequest) - com.google.cloud.dataproc.v1beta2.SubmitJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.SubmitJobRequest.class, - com.google.cloud.dataproc.v1beta2.SubmitJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_SubmitJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SubmitJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.SubmitJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SubmitJobRequest build() { - com.google.cloud.dataproc.v1beta2.SubmitJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.SubmitJobRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.SubmitJobRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.SubmitJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.SubmitJobRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.JobOrBuilder> - jobBuilder_; - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The job. - */ - public com.google.cloud.dataproc.v1beta2.Job getJob() { - if (jobBuilder_ == null) { - return job_ == null ? com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance() : job_; - } else { - return jobBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJob(com.google.cloud.dataproc.v1beta2.Job.Builder builderForValue) { - if (jobBuilder_ == null) { - job_ = builderForValue.build(); - onChanged(); - } else { - jobBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeJob(com.google.cloud.dataproc.v1beta2.Job value) { - if (jobBuilder_ == null) { - if (job_ != null) { - job_ = - com.google.cloud.dataproc.v1beta2.Job.newBuilder(job_) - .mergeFrom(value) - .buildPartial(); - } else { - job_ = value; - } - onChanged(); - } else { - jobBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.Job.Builder getJobBuilder() { - - onChanged(); - return getJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobOrBuilder getJobOrBuilder() { - if (jobBuilder_ != null) { - return jobBuilder_.getMessageOrBuilder(); - } else { - return job_ == null ? com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance() : job_; - } - } - /** - * - * - *
-     * Required. The job resource.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.JobOrBuilder> - getJobFieldBuilder() { - if (jobBuilder_ == null) { - jobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-     * id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-     * id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-     * id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-     * id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-     * id, then the second request will be ignored and the
-     * first [Job][google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.SubmitJobRequest) - private static final com.google.cloud.dataproc.v1beta2.SubmitJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.SubmitJobRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.SubmitJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequestOrBuilder.java deleted file mode 100644 index 3ec50474..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/SubmitJobRequestOrBuilder.java +++ /dev/null @@ -1,156 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface SubmitJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the job field is set. - */ - boolean hasJob(); - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The job. - */ - com.google.cloud.dataproc.v1beta2.Job getJob(); - /** - * - * - *
-   * Required. The job resource.
-   * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.JobOrBuilder getJobOrBuilder(); - - /** - * - * - *
-   * Optional. A unique id used to identify the request. If the server
-   * receives two [SubmitJobRequest][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-   * id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1beta2.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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests  with the same
-   * id, then the second request will be ignored and the
-   * first [Job][google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java deleted file mode 100644 index 8dfffc12..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameter.java +++ /dev/null @@ -1,1894 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.TemplateParameter} - */ -public final class TemplateParameter extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation.Builder subBuilder = null; - if (validation_ != null) { - subBuilder = validation_.toBuilder(); - } - validation_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.TemplateParameter.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ParameterValidation validation_; - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - * - * @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.v1beta2.ParameterValidation validation = 4; - * - * @return The validation. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ParameterValidation getValidation() { - return validation_ == null - ? com.google.cloud.dataproc.v1beta2.ParameterValidation.getDefaultInstance() - : validation_; - } - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getNameBytes().isEmpty()) { - 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 (!getDescriptionBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - 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 (!getDescriptionBytes().isEmpty()) { - 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.v1beta2.TemplateParameter)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.TemplateParameter other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.TemplateParameter) - com.google.cloud.dataproc.v1beta2.TemplateParameterOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.TemplateParameter.class, - com.google.cloud.dataproc.v1beta2.TemplateParameter.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.TemplateParameter getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.TemplateParameter.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.TemplateParameter build() { - com.google.cloud.dataproc.v1beta2.TemplateParameter result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.TemplateParameter buildPartial() { - com.google.cloud.dataproc.v1beta2.TemplateParameter result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.TemplateParameter) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.TemplateParameter other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ParameterValidation validation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ParameterValidation, - com.google.cloud.dataproc.v1beta2.ParameterValidation.Builder, - com.google.cloud.dataproc.v1beta2.ParameterValidationOrBuilder> - validationBuilder_; - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - * - * @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.v1beta2.ParameterValidation validation = 4; - * - * @return The validation. - */ - public com.google.cloud.dataproc.v1beta2.ParameterValidation getValidation() { - if (validationBuilder_ == null) { - return validation_ == null - ? com.google.cloud.dataproc.v1beta2.ParameterValidation.getDefaultInstance() - : validation_; - } else { - return validationBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - */ - public Builder setValidation(com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation validation = 4; - */ - public Builder setValidation( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation validation = 4; - */ - public Builder mergeValidation(com.google.cloud.dataproc.v1beta2.ParameterValidation value) { - if (validationBuilder_ == null) { - if (validation_ != null) { - validation_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.ParameterValidation validation = 4; - */ - 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.v1beta2.ParameterValidation validation = 4; - */ - public com.google.cloud.dataproc.v1beta2.ParameterValidation.Builder getValidationBuilder() { - - onChanged(); - return getValidationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - */ - public com.google.cloud.dataproc.v1beta2.ParameterValidationOrBuilder getValidationOrBuilder() { - if (validationBuilder_ != null) { - return validationBuilder_.getMessageOrBuilder(); - } else { - return validation_ == null - ? com.google.cloud.dataproc.v1beta2.ParameterValidation.getDefaultInstance() - : validation_; - } - } - /** - * - * - *
-     * Optional. Validation rules to be applied to this parameter's value.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ParameterValidation, - com.google.cloud.dataproc.v1beta2.ParameterValidation.Builder, - com.google.cloud.dataproc.v1beta2.ParameterValidationOrBuilder> - getValidationFieldBuilder() { - if (validationBuilder_ == null) { - validationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ParameterValidation, - com.google.cloud.dataproc.v1beta2.ParameterValidation.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.TemplateParameter) - private static final com.google.cloud.dataproc.v1beta2.TemplateParameter DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.TemplateParameter(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java deleted file mode 100644 index 93c43366..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/TemplateParameterOrBuilder.java +++ /dev/null @@ -1,315 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface TemplateParameterOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Optional. Brief description of the parameter.
-   * Must not exceed 1024 characters.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - * - * @return Whether the validation field is set. - */ - boolean hasValidation(); - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - * - * @return The validation. - */ - com.google.cloud.dataproc.v1beta2.ParameterValidation getValidation(); - /** - * - * - *
-   * Optional. Validation rules to be applied to this parameter's value.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ParameterValidation validation = 4; - */ - com.google.cloud.dataproc.v1beta2.ParameterValidationOrBuilder getValidationOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java deleted file mode 100644 index e916172d..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequest.java +++ /dev/null @@ -1,768 +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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to update an autoscaling policy.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest} - */ -public final class UpdateAutoscalingPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.Builder.class); - } - - public static final int POLICY_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1beta2.AutoscalingPolicy policy_; - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy() { - return policy_ == null - ? com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.class, - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPoliciesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateAutoscalingPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest build() { - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1beta2.AutoscalingPolicy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null - ? com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance() - : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy(com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePolicy(com.google.cloud.dataproc.v1beta2.AutoscalingPolicy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.newBuilder(policy_) - .mergeFrom(value) - .buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null - ? com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.getDefaultInstance() - : policy_; - } - } - /** - * - * - *
-     * Required. The updated autoscaling policy.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy, - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) - private static final com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateAutoscalingPolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateAutoscalingPolicyRequestOrBuilder.java deleted file mode 100644 index 81514211..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/autoscaling_policies.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface UpdateAutoscalingPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getPolicy(); - /** - * - * - *
-   * Required. The updated autoscaling policy.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.AutoscalingPolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.AutoscalingPolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequest.java deleted file mode 100644 index 3a55fc4f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequest.java +++ /dev/null @@ -1,2870 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to update a cluster.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.UpdateClusterRequest} - */ -public final class UpdateClusterRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.Cluster.Builder subBuilder = null; - if (cluster_ != null) { - subBuilder = cluster_.toBuilder(); - } - cluster_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster_; - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Cluster getCluster() { - return cluster_ == null - ? com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance() - : cluster_; - } - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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>
-   * <tr>
-   * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-   * </tr>
-   * <tr>
-   * <td>labels</td><td>Updates labels</td>
-   * </tr>
-   * <tr>
-   * <td>config.worker_config.num_instances</td><td>Resize primary worker
-   * group</td>
-   * </tr>
-   * <tr>
-   * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-   * worker group</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-   * deletion timestamp</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-   * autoscaling policies</td>
-   * </tr>
-   * </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>
-   * <tr>
-   * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-   * </tr>
-   * <tr>
-   * <td>labels</td><td>Updates labels</td>
-   * </tr>
-   * <tr>
-   * <td>config.worker_config.num_instances</td><td>Resize primary worker
-   * group</td>
-   * </tr>
-   * <tr>
-   * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-   * worker group</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-   * deletion timestamp</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-   * autoscaling policies</td>
-   * </tr>
-   * </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>
-   * <tr>
-   * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-   * </tr>
-   * <tr>
-   * <td>labels</td><td>Updates labels</td>
-   * </tr>
-   * <tr>
-   * <td>config.worker_config.num_instances</td><td>Resize primary worker
-   * group</td>
-   * </tr>
-   * <tr>
-   * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-   * worker group</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-   * deletion timestamp</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-   * autoscaling policies</td>
-   * </tr>
-   * </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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterName_); - } - if (cluster_ != null) { - output.writeMessage(3, getCluster()); - } - if (updateMask_ != null) { - output.writeMessage(4, getUpdateMask()); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, region_); - } - if (gracefulDecommissionTimeout_ != null) { - output.writeMessage(6, getGracefulDecommissionTimeout()); - } - if (!getRequestIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, region_); - } - if (gracefulDecommissionTimeout_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, getGracefulDecommissionTimeout()); - } - if (!getRequestIdBytes().isEmpty()) { - 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.v1beta2.UpdateClusterRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.UpdateClusterRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.UpdateClusterRequest) - com.google.cloud.dataproc.v1beta2.UpdateClusterRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest.class, - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.ClustersProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateClusterRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateClusterRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.UpdateClusterRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateClusterRequest build() { - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateClusterRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.UpdateClusterRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.UpdateClusterRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.UpdateClusterRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> - clusterBuilder_; - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - public com.google.cloud.dataproc.v1beta2.Cluster getCluster() { - if (clusterBuilder_ == null) { - return cluster_ == null - ? com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance() - : cluster_; - } else { - return clusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setCluster(com.google.cloud.dataproc.v1beta2.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.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeCluster(com.google.cloud.dataproc.v1beta2.Cluster value) { - if (clusterBuilder_ == null) { - if (cluster_ != null) { - cluster_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.Cluster.Builder getClusterBuilder() { - - onChanged(); - return getClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOrBuilder getClusterOrBuilder() { - if (clusterBuilder_ != null) { - return clusterBuilder_.getMessageOrBuilder(); - } else { - return cluster_ == null - ? com.google.cloud.dataproc.v1beta2.Cluster.getDefaultInstance() - : cluster_; - } - } - /** - * - * - *
-     * Required. The changes to the cluster.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOrBuilder> - getClusterFieldBuilder() { - if (clusterBuilder_ == null) { - clusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Cluster, - com.google.cloud.dataproc.v1beta2.Cluster.Builder, - com.google.cloud.dataproc.v1beta2.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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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>
-     * <tr>
-     * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-     * </tr>
-     * <tr>
-     * <td>labels</td><td>Updates labels</td>
-     * </tr>
-     * <tr>
-     * <td>config.worker_config.num_instances</td><td>Resize primary worker
-     * group</td>
-     * </tr>
-     * <tr>
-     * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-     * worker group</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-     * deletion timestamp</td>
-     * </tr>
-     * <tr>
-     * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-     * duration</td>
-     * </tr>
-     * <tr>
-     * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-     * autoscaling policies</td>
-     * </tr>
-     * </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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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.v1beta2.UpdateClusterRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.UpdateClusterRequest) - private static final com.google.cloud.dataproc.v1beta2.UpdateClusterRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.UpdateClusterRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateClusterRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequestOrBuilder.java deleted file mode 100644 index ff07b68c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateClusterRequestOrBuilder.java +++ /dev/null @@ -1,449 +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/v1beta2/clusters.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface UpdateClusterRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The cluster. - */ - com.google.cloud.dataproc.v1beta2.Cluster getCluster(); - /** - * - * - *
-   * Required. The changes to the cluster.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.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>
-   * <tr>
-   * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-   * </tr>
-   * <tr>
-   * <td>labels</td><td>Updates labels</td>
-   * </tr>
-   * <tr>
-   * <td>config.worker_config.num_instances</td><td>Resize primary worker
-   * group</td>
-   * </tr>
-   * <tr>
-   * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-   * worker group</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-   * deletion timestamp</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-   * autoscaling policies</td>
-   * </tr>
-   * </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>
-   * <tr>
-   * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-   * </tr>
-   * <tr>
-   * <td>labels</td><td>Updates labels</td>
-   * </tr>
-   * <tr>
-   * <td>config.worker_config.num_instances</td><td>Resize primary worker
-   * group</td>
-   * </tr>
-   * <tr>
-   * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-   * worker group</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-   * deletion timestamp</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-   * autoscaling policies</td>
-   * </tr>
-   * </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>
-   * <tr>
-   * <td><strong>Mask</strong></td><td><strong>Purpose</strong></td>
-   * </tr>
-   * <tr>
-   * <td>labels</td><td>Updates labels</td>
-   * </tr>
-   * <tr>
-   * <td>config.worker_config.num_instances</td><td>Resize primary worker
-   * group</td>
-   * </tr>
-   * <tr>
-   * <td>config.secondary_worker_config.num_instances</td><td>Resize secondary
-   * worker group</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_ttl</td><td>Reset MAX TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.auto_delete_time</td><td>Update MAX TTL
-   * deletion timestamp</td>
-   * </tr>
-   * <tr>
-   * <td>config.lifecycle_config.idle_delete_ttl</td><td>Update Idle TTL
-   * duration</td>
-   * </tr>
-   * <tr>
-   * <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or change
-   * autoscaling policies</td>
-   * </tr>
-   * </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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests  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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequest.java deleted file mode 100644 index c0e7a258..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequest.java +++ /dev/null @@ -1,1628 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to update a job.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.UpdateJobRequest} - */ -public final class UpdateJobRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.Job.Builder subBuilder = null; - if (job_ != null) { - subBuilder = job_.toBuilder(); - } - job_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateJobRequest.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job_; - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The job. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.Job getJob() { - return job_ == null ? com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance() : job_; - } - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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 (!getProjectIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); - } - if (!getRegionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, region_); - } - if (!getJobIdBytes().isEmpty()) { - 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 (!getProjectIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); - } - if (!getRegionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, region_); - } - if (!getJobIdBytes().isEmpty()) { - 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.v1beta2.UpdateJobRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.UpdateJobRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.UpdateJobRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.UpdateJobRequest) - com.google.cloud.dataproc.v1beta2.UpdateJobRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateJobRequest.class, - com.google.cloud.dataproc.v1beta2.UpdateJobRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateJobRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateJobRequest getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.UpdateJobRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateJobRequest build() { - com.google.cloud.dataproc.v1beta2.UpdateJobRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateJobRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.UpdateJobRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.UpdateJobRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.UpdateJobRequest other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.JobOrBuilder> - jobBuilder_; - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The job. - */ - public com.google.cloud.dataproc.v1beta2.Job getJob() { - if (jobBuilder_ == null) { - return job_ == null ? com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance() : job_; - } else { - return jobBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setJob(com.google.cloud.dataproc.v1beta2.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.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeJob(com.google.cloud.dataproc.v1beta2.Job value) { - if (jobBuilder_ == null) { - if (job_ != null) { - job_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.Job.Builder getJobBuilder() { - - onChanged(); - return getJobFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.JobOrBuilder getJobOrBuilder() { - if (jobBuilder_ != null) { - return jobBuilder_.getMessageOrBuilder(); - } else { - return job_ == null ? com.google.cloud.dataproc.v1beta2.Job.getDefaultInstance() : job_; - } - } - /** - * - * - *
-     * Required. The changes to the job.
-     * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.JobOrBuilder> - getJobFieldBuilder() { - if (jobBuilder_ == null) { - jobBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.Job, - com.google.cloud.dataproc.v1beta2.Job.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.UpdateJobRequest) - private static final com.google.cloud.dataproc.v1beta2.UpdateJobRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.UpdateJobRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateJobRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequestOrBuilder.java deleted file mode 100644 index 6c10ce4c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateJobRequestOrBuilder.java +++ /dev/null @@ -1,193 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface UpdateJobRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The job. - */ - com.google.cloud.dataproc.v1beta2.Job getJob(); - /** - * - * - *
-   * Required. The changes to the job.
-   * 
- * - * .google.cloud.dataproc.v1beta2.Job job = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequest.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequest.java deleted file mode 100644 index 9594613b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequest.java +++ /dev/null @@ -1,779 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A request to update a workflow template.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest} - */ -public final class UpdateWorkflowTemplateRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate.Builder subBuilder = null; - if (template_ != null) { - subBuilder = template_.toBuilder(); - } - template_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest.Builder.class); - } - - public static final int TEMPLATE_FIELD_NUMBER = 1; - private com.google.cloud.dataproc.v1beta2.WorkflowTemplate template_; - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate() { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest) - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest.class, - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest - getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest build() { - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest buildPartial() { - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest other) { - if (other - == com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.dataproc.v1beta2.WorkflowTemplate template_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - templateBuilder_; - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate() { - if (templateBuilder_ == null) { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } else { - return templateBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTemplate( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTemplate(com.google.cloud.dataproc.v1beta2.WorkflowTemplate value) { - if (templateBuilder_ == null) { - if (template_ != null) { - template_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder getTemplateBuilder() { - - onChanged(); - return getTemplateFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder() { - if (templateBuilder_ != null) { - return templateBuilder_.getMessageOrBuilder(); - } else { - return template_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance() - : template_; - } - } - /** - * - * - *
-     * Required. The updated workflow template.
-     * The `template.version` field must match the current version.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder> - getTemplateFieldBuilder() { - if (templateBuilder_ == null) { - templateBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplate, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest) - private static final com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.UpdateWorkflowTemplateRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequestOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/UpdateWorkflowTemplateRequestOrBuilder.java deleted file mode 100644 index b3982e8f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface UpdateWorkflowTemplateRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.UpdateWorkflowTemplateRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The template. - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplate getTemplate(); - /** - * - * - *
-   * Required. The updated workflow template.
-   * The `template.version` field must match the current version.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowTemplate template = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder getTemplateOrBuilder(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidation.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidation.java deleted file mode 100644 index b69a81ef..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidation.java +++ /dev/null @@ -1,737 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Validation based on a list of allowed values.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.ValueValidation} - */ -public final class ValueValidation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ValueValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ValueValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ValueValidation.class, - com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1; - * - * @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; - * - * @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.v1beta2.ValueValidation)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.ValueValidation other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ValueValidation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.ValueValidation) - com.google.cloud.dataproc.v1beta2.ValueValidationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ValueValidation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ValueValidation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.ValueValidation.class, - com.google.cloud.dataproc.v1beta2.ValueValidation.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_ValueValidation_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidation getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.ValueValidation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidation build() { - com.google.cloud.dataproc.v1beta2.ValueValidation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ValueValidation buildPartial() { - com.google.cloud.dataproc.v1beta2.ValueValidation result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.ValueValidation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.ValueValidation other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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; - * - * @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; - * - * @return The count of values. - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-     * Required. List of allowed values for the parameter.
-     * 
- * - * repeated string values = 1; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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; - * - * @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.v1beta2.ValueValidation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.ValueValidation) - private static final com.google.cloud.dataproc.v1beta2.ValueValidation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.ValueValidation(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.ValueValidation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidationOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/ValueValidationOrBuilder.java deleted file mode 100644 index 929c9555..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface ValueValidationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.ValueValidation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1; - * - * @return A list containing the values. - */ - java.util.List getValuesList(); - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1; - * - * @return The count of values. - */ - int getValuesCount(); - /** - * - * - *
-   * Required. List of allowed values for the parameter.
-   * 
- * - * repeated string values = 1; - * - * @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; - * - * @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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraph.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraph.java deleted file mode 100644 index f415a5d1..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraph.java +++ /dev/null @@ -1,995 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The workflow graph.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.WorkflowGraph} - */ -public final class WorkflowGraph extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowGraph.class, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowNode getNodes(int index) { - return nodes_.get(index); - } - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.WorkflowGraph other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowGraph} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.WorkflowGraph) - com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowGraph.class, - com.google.cloud.dataproc.v1beta2.WorkflowGraph.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowGraph getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowGraph.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowGraph build() { - com.google.cloud.dataproc.v1beta2.WorkflowGraph result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowGraph buildPartial() { - com.google.cloud.dataproc.v1beta2.WorkflowGraph result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.WorkflowGraph) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.WorkflowGraph other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode, - com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowNodeOrBuilder> - nodesBuilder_; - - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNodes(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setNodes( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder addNodes( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder getNodesBuilder(int index) { - return getNodesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder addNodesBuilder() { - return getNodesFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.WorkflowNode.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder addNodesBuilder(int index) { - return getNodesFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1beta2.WorkflowNode.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The workflow nodes.
-     * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode, - com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowNodeOrBuilder> - getNodesFieldBuilder() { - if (nodesBuilder_ == null) { - nodesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowNode, - com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.WorkflowGraph) - private static final com.google.cloud.dataproc.v1beta2.WorkflowGraph DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.WorkflowGraph(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraphOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowGraphOrBuilder.java deleted file mode 100644 index c064f028..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface WorkflowGraphOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.WorkflowGraph) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List getNodesList(); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowNode getNodes(int index); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - int getNodesCount(); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - java.util.List - getNodesOrBuilderList(); - /** - * - * - *
-   * Output only. The workflow nodes.
-   * 
- * - * - * repeated .google.cloud.dataproc.v1beta2.WorkflowNode nodes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowNodeOrBuilder getNodesOrBuilder(int index); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadata.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadata.java deleted file mode 100644 index 201bff3c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadata.java +++ /dev/null @@ -1,3284 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc workflow template resource.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.WorkflowMetadata} - */ -public final class WorkflowMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation.Builder subBuilder = null; - if (createCluster_ != null) { - subBuilder = createCluster_.toBuilder(); - } - createCluster_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ClusterOperation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createCluster_); - createCluster_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.dataproc.v1beta2.WorkflowGraph.Builder subBuilder = null; - if (graph_ != null) { - subBuilder = graph_.toBuilder(); - } - graph_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.WorkflowGraph.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(graph_); - graph_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder subBuilder = null; - if (deleteCluster_ != null) { - subBuilder = deleteCluster_.toBuilder(); - } - deleteCluster_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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; - } - 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.class, - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.Builder.class); - } - - /** - * - * - *
-   * The operation state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.ClusterOperation createCluster_; - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperation getCreateCluster() { - return createCluster_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance() - : createCluster_; - } - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder getCreateClusterOrBuilder() { - return getCreateCluster(); - } - - public static final int GRAPH_FIELD_NUMBER = 4; - private com.google.cloud.dataproc.v1beta2.WorkflowGraph graph_; - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The graph. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowGraph getGraph() { - return graph_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowGraph.getDefaultInstance() - : graph_; - } - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder getGraphOrBuilder() { - return getGraph(); - } - - public static final int DELETE_CLUSTER_FIELD_NUMBER = 5; - private com.google.cloud.dataproc.v1beta2.ClusterOperation deleteCluster_; - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperation getDeleteCluster() { - return deleteCluster_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance() - : deleteCluster_; - } - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder getDeleteClusterOrBuilder() { - return getDeleteCluster(); - } - - public static final int STATE_FIELD_NUMBER = 6; - private int state_; - /** - * - * - *
-   * Output only. The workflow state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State result = - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTemplateBytes().isEmpty()) { - 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.v1beta2.WorkflowMetadata.State.UNKNOWN.getNumber()) { - output.writeEnum(6, state_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterUuidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, clusterUuid_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTemplateBytes().isEmpty()) { - 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.v1beta2.WorkflowMetadata.State.UNKNOWN.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); - } - if (!getClusterNameBytes().isEmpty()) { - 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 (!getClusterUuidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, clusterUuid_); - } - 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.v1beta2.WorkflowMetadata)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.WorkflowMetadata other = - (com.google.cloud.dataproc.v1beta2.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 (!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(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.WorkflowMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.WorkflowMetadata) - com.google.cloud.dataproc.v1beta2.WorkflowMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.class, - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowMetadata getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowMetadata build() { - com.google.cloud.dataproc.v1beta2.WorkflowMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowMetadata buildPartial() { - com.google.cloud.dataproc.v1beta2.WorkflowMetadata result = - new com.google.cloud.dataproc.v1beta2.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_; - 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.v1beta2.WorkflowMetadata) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.WorkflowMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.WorkflowMetadata other) { - if (other == com.google.cloud.dataproc.v1beta2.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(); - } - 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.v1beta2.WorkflowMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation createCluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperation, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder> - createClusterBuilder_; - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createCluster. - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperation getCreateCluster() { - if (createClusterBuilder_ == null) { - return createCluster_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance() - : createCluster_; - } else { - return createClusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateCluster(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateCluster( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateCluster(com.google.cloud.dataproc.v1beta2.ClusterOperation value) { - if (createClusterBuilder_ == null) { - if (createCluster_ != null) { - createCluster_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder getCreateClusterBuilder() { - - onChanged(); - return getCreateClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder getCreateClusterOrBuilder() { - if (createClusterBuilder_ != null) { - return createClusterBuilder_.getMessageOrBuilder(); - } else { - return createCluster_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance() - : createCluster_; - } - } - /** - * - * - *
-     * Output only. The create cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperation, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder> - getCreateClusterFieldBuilder() { - if (createClusterBuilder_ == null) { - createClusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperation, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder>( - getCreateCluster(), getParentForChildren(), isClean()); - createCluster_ = null; - } - return createClusterBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.WorkflowGraph graph_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowGraph, - com.google.cloud.dataproc.v1beta2.WorkflowGraph.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder> - graphBuilder_; - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The graph. - */ - public com.google.cloud.dataproc.v1beta2.WorkflowGraph getGraph() { - if (graphBuilder_ == null) { - return graph_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowGraph.getDefaultInstance() - : graph_; - } else { - return graphBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGraph(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setGraph( - com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeGraph(com.google.cloud.dataproc.v1beta2.WorkflowGraph value) { - if (graphBuilder_ == null) { - if (graph_ != null) { - graph_ = - com.google.cloud.dataproc.v1beta2.WorkflowGraph.newBuilder(graph_) - .mergeFrom(value) - .buildPartial(); - } else { - graph_ = value; - } - onChanged(); - } else { - graphBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowGraph.Builder getGraphBuilder() { - - onChanged(); - return getGraphFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder getGraphOrBuilder() { - if (graphBuilder_ != null) { - return graphBuilder_.getMessageOrBuilder(); - } else { - return graph_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowGraph.getDefaultInstance() - : graph_; - } - } - /** - * - * - *
-     * Output only. The workflow graph.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowGraph, - com.google.cloud.dataproc.v1beta2.WorkflowGraph.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder> - getGraphFieldBuilder() { - if (graphBuilder_ == null) { - graphBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowGraph, - com.google.cloud.dataproc.v1beta2.WorkflowGraph.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder>( - getGraph(), getParentForChildren(), isClean()); - graph_ = null; - } - return graphBuilder_; - } - - private com.google.cloud.dataproc.v1beta2.ClusterOperation deleteCluster_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperation, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder> - deleteClusterBuilder_; - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteCluster. - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperation getDeleteCluster() { - if (deleteClusterBuilder_ == null) { - return deleteCluster_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance() - : deleteCluster_; - } else { - return deleteClusterBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteCluster(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setDeleteCluster( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeDeleteCluster(com.google.cloud.dataproc.v1beta2.ClusterOperation value) { - if (deleteClusterBuilder_ == null) { - if (deleteCluster_ != null) { - deleteCluster_ = - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder getDeleteClusterBuilder() { - - onChanged(); - return getDeleteClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder getDeleteClusterOrBuilder() { - if (deleteClusterBuilder_ != null) { - return deleteClusterBuilder_.getMessageOrBuilder(); - } else { - return deleteCluster_ == null - ? com.google.cloud.dataproc.v1beta2.ClusterOperation.getDefaultInstance() - : deleteCluster_; - } - } - /** - * - * - *
-     * Output only. The delete cluster operation metadata.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperation, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder> - getDeleteClusterFieldBuilder() { - if (deleteClusterBuilder_ == null) { - deleteClusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterOperation, - com.google.cloud.dataproc.v1beta2.ClusterOperation.Builder, - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder>( - getDeleteCluster(), getParentForChildren(), isClean()); - deleteCluster_ = null; - } - return deleteClusterBuilder_; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. The workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State result = - com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.WorkflowMetadata.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The workflow state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.WorkflowMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.WorkflowMetadata) - private static final com.google.cloud.dataproc.v1beta2.WorkflowMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.WorkflowMetadata(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadataOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadataOrBuilder.java deleted file mode 100644 index 5b59db24..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowMetadataOrBuilder.java +++ /dev/null @@ -1,410 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface WorkflowMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createCluster. - */ - com.google.cloud.dataproc.v1beta2.ClusterOperation getCreateCluster(); - /** - * - * - *
-   * Output only. The create cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation create_cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder getCreateClusterOrBuilder(); - - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The graph. - */ - com.google.cloud.dataproc.v1beta2.WorkflowGraph getGraph(); - /** - * - * - *
-   * Output only. The workflow graph.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.WorkflowGraph graph = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.WorkflowGraphOrBuilder getGraphOrBuilder(); - - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The deleteCluster. - */ - com.google.cloud.dataproc.v1beta2.ClusterOperation getDeleteCluster(); - /** - * - * - *
-   * Output only. The delete cluster operation metadata.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.ClusterOperation delete_cluster = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.cloud.dataproc.v1beta2.ClusterOperationOrBuilder getDeleteClusterOrBuilder(); - - /** - * - * - *
-   * Output only. The workflow state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowMetadata.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1beta2.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(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNode.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNode.java deleted file mode 100644 index e5cba5e4..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNode.java +++ /dev/null @@ -1,1682 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * The workflow node.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.WorkflowNode} - */ -public final class WorkflowNode extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowNode.class, - com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder.class); - } - - /** - * - * - *
-   * The workflow node state.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.WorkflowNode.NodeState} - */ - public enum NodeState implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * State is unspecified.
-     * 
- * - * NODE_STATUS_UNSPECIFIED = 0; - */ - NODE_STATUS_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_STATUS_UNSPECIFIED = 0; - */ - public static final int NODE_STATUS_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_STATUS_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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState result = - com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.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 (!getStepIdBytes().isEmpty()) { - 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 (!getJobIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jobId_); - } - if (state_ - != com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState.NODE_STATUS_UNSPECIFIED - .getNumber()) { - output.writeEnum(5, state_); - } - if (!getErrorBytes().isEmpty()) { - 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 (!getStepIdBytes().isEmpty()) { - 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 (!getJobIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jobId_); - } - if (state_ - != com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState.NODE_STATUS_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_); - } - if (!getErrorBytes().isEmpty()) { - 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.v1beta2.WorkflowNode)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.WorkflowNode other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.WorkflowNode) - com.google.cloud.dataproc.v1beta2.WorkflowNodeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowNode.class, - com.google.cloud.dataproc.v1beta2.WorkflowNode.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowNode getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowNode.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowNode build() { - com.google.cloud.dataproc.v1beta2.WorkflowNode result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowNode buildPartial() { - com.google.cloud.dataproc.v1beta2.WorkflowNode result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.WorkflowNode) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.WorkflowNode other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState result = - com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.WorkflowNode.NodeState.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The node state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode.NodeState value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The node state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.WorkflowNode) - private static final com.google.cloud.dataproc.v1beta2.WorkflowNode DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.WorkflowNode(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowNode getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNodeOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowNodeOrBuilder.java deleted file mode 100644 index 551d299f..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface WorkflowNodeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.WorkflowNode.NodeState state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1beta2.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplate.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplate.java deleted file mode 100644 index d794731c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplate.java +++ /dev/null @@ -1,3370 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * A Dataproc workflow template resource.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.WorkflowTemplate} - */ -public final class WorkflowTemplate extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement.Builder subBuilder = null; - if (placement_ != null) { - subBuilder = placement_.toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter.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)) { - 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.class, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 2; - private volatile java.lang.Object id_; - /** - * - * - *
-   * Required. The template 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 = 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; - } - } - /** - * - * - *
-   * Required. The template 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 = 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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatePlacement placement_; - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - * - * @return Whether the placement field is set. - */ - @java.lang.Override - public boolean hasPlacement() { - return placement_ != null; - } - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - * - * @return The placement. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement getPlacement() { - return placement_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.getDefaultInstance() - : placement_; - } - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - @java.lang.Override - public java.util.List getJobsList() { - return jobs_; - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - @java.lang.Override - public java.util.List - getJobsOrBuilderList() { - return jobs_; - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - @java.lang.Override - public int getJobsCount() { - return jobs_.size(); - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.OrderedJob getJobs(int index) { - return jobs_.get(index); - } - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.TemplateParameterOrBuilder getParametersOrBuilder( - int index) { - return parameters_.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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getIdBytes().isEmpty()) { - 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)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getIdBytes().isEmpty()) { - 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)); - } - 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.v1beta2.WorkflowTemplate)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.WorkflowTemplate other = - (com.google.cloud.dataproc.v1beta2.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 (!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(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.dataproc.v1beta2.WorkflowTemplate parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplate} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.WorkflowTemplate) - com.google.cloud.dataproc.v1beta2.WorkflowTemplateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.class, - com.google.cloud.dataproc.v1beta2.WorkflowTemplate.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplate.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate build() { - com.google.cloud.dataproc.v1beta2.WorkflowTemplate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplate buildPartial() { - com.google.cloud.dataproc.v1beta2.WorkflowTemplate result = - new com.google.cloud.dataproc.v1beta2.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(); - } - 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.v1beta2.WorkflowTemplate) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.WorkflowTemplate) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.WorkflowTemplate other) { - if (other == com.google.cloud.dataproc.v1beta2.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_); - } - } - } - 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.v1beta2.WorkflowTemplate parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.WorkflowTemplate) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * - * - *
-     * Required. The template 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 = 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; - } - } - /** - * - * - *
-     * Required. The template 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 = 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; - } - } - /** - * - * - *
-     * Required. The template 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 = 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; - } - /** - * - * - *
-     * Required. The template 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The template 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 = 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.v1beta2.WorkflowTemplatePlacement placement_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement, - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacementOrBuilder> - placementBuilder_; - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - * - * @return Whether the placement field is set. - */ - public boolean hasPlacement() { - return placementBuilder_ != null || placement_ != null; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - * - * @return The placement. - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement getPlacement() { - if (placementBuilder_ == null) { - return placement_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.getDefaultInstance() - : placement_; - } else { - return placementBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - public Builder setPlacement(com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - public Builder setPlacement( - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.Builder builderForValue) { - if (placementBuilder_ == null) { - placement_ = builderForValue.build(); - onChanged(); - } else { - placementBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - public Builder mergePlacement( - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement value) { - if (placementBuilder_ == null) { - if (placement_ != null) { - placement_ = - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.newBuilder(placement_) - .mergeFrom(value) - .buildPartial(); - } else { - placement_ = value; - } - onChanged(); - } else { - placementBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - public Builder clearPlacement() { - if (placementBuilder_ == null) { - placement_ = null; - onChanged(); - } else { - placement_ = null; - placementBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.Builder - getPlacementBuilder() { - - onChanged(); - return getPlacementFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacementOrBuilder - getPlacementOrBuilder() { - if (placementBuilder_ != null) { - return placementBuilder_.getMessageOrBuilder(); - } else { - return placement_ == null - ? com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.getDefaultInstance() - : placement_; - } - } - /** - * - * - *
-     * Required. WorkflowTemplate scheduling information.
-     * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement, - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.Builder, - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacementOrBuilder> - getPlacementFieldBuilder() { - if (placementBuilder_ == null) { - placementBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement, - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob, - com.google.cloud.dataproc.v1beta2.OrderedJob.Builder, - com.google.cloud.dataproc.v1beta2.OrderedJobOrBuilder> - jobsBuilder_; - - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - 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.v1beta2.OrderedJob jobs = 8; - */ - 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.v1beta2.OrderedJob jobs = 8; - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - public Builder setJobs(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - public Builder setJobs( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - public Builder addJobs(com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - public Builder addJobs(int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - public Builder addJobs(com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - public Builder addJobs( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - 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.v1beta2.OrderedJob jobs = 8; - */ - 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.v1beta2.OrderedJob jobs = 8; - */ - 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.v1beta2.OrderedJob jobs = 8; - */ - public com.google.cloud.dataproc.v1beta2.OrderedJob.Builder getJobsBuilder(int index) { - return getJobsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.OrderedJob jobs = 8; - */ - 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.v1beta2.OrderedJob jobs = 8; - */ - public com.google.cloud.dataproc.v1beta2.OrderedJob.Builder addJobsBuilder() { - return getJobsFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.OrderedJob.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - public com.google.cloud.dataproc.v1beta2.OrderedJob.Builder addJobsBuilder(int index) { - return getJobsFieldBuilder() - .addBuilder(index, com.google.cloud.dataproc.v1beta2.OrderedJob.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The Directed Acyclic Graph of Jobs to submit.
-     * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - public java.util.List - getJobsBuilderList() { - return getJobsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.OrderedJob, - com.google.cloud.dataproc.v1beta2.OrderedJob.Builder, - com.google.cloud.dataproc.v1beta2.OrderedJobOrBuilder> - getJobsFieldBuilder() { - if (jobsBuilder_ == null) { - jobsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.OrderedJob, - com.google.cloud.dataproc.v1beta2.OrderedJob.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter, - com.google.cloud.dataproc.v1beta2.TemplateParameter.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setParameters( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters(com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addParameters( - int index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.TemplateParameter.Builder addParametersBuilder() { - return getParametersFieldBuilder() - .addBuilder(com.google.cloud.dataproc.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.dataproc.v1beta2.TemplateParameter.Builder addParametersBuilder( - int index) { - return getParametersFieldBuilder() - .addBuilder( - index, com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter, - com.google.cloud.dataproc.v1beta2.TemplateParameter.Builder, - com.google.cloud.dataproc.v1beta2.TemplateParameterOrBuilder> - getParametersFieldBuilder() { - if (parametersBuilder_ == null) { - parametersBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.TemplateParameter, - com.google.cloud.dataproc.v1beta2.TemplateParameter.Builder, - com.google.cloud.dataproc.v1beta2.TemplateParameterOrBuilder>( - parameters_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - parameters_ = null; - } - return parametersBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(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.v1beta2.WorkflowTemplate) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.WorkflowTemplate) - private static final com.google.cloud.dataproc.v1beta2.WorkflowTemplate DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.WorkflowTemplate(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java deleted file mode 100644 index 77b3526a..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateName.java +++ /dev/null @@ -1,360 +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.v1beta2; - -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; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class WorkflowTemplateName implements ResourceName { - - @Deprecated - protected WorkflowTemplateName() {} - - private static final PathTemplate PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}"); - private static final PathTemplate PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/workflowTemplates/{workflow_template}"); - - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - - private String project; - private String region; - private String workflowTemplate; - private String location; - - public String getProject() { - return project; - } - - public String getRegion() { - return region; - } - - public String getWorkflowTemplate() { - return workflowTemplate; - } - - public String getLocation() { - return location; - } - - private WorkflowTemplateName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - region = Preconditions.checkNotNull(builder.getRegion()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); - pathTemplate = PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE; - } - - private WorkflowTemplateName(ProjectLocationWorkflowTemplateBuilder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - workflowTemplate = Preconditions.checkNotNull(builder.getWorkflowTemplate()); - pathTemplate = PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE; - } - - 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 newProjectRegionWorkflowTemplateBuilder() - .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 newProjectRegionWorkflowTemplateBuilder() - .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_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString); - return ofProjectRegionWorkflowTemplateName( - matchMap.get("project"), matchMap.get("region"), matchMap.get("workflow_template")); - } else if (PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.matches(formattedString)) { - Map matchMap = - PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_TEMPLATE.match(formattedString); - return ofProjectLocationWorkflowTemplateName( - matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow_template")); - } - throw new ValidationException("JobName.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_PATH_TEMPLATE.matches(formattedString) - || PROJECT_LOCATION_WORKFLOW_TEMPLATE_PATH_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()); - } - - /** 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( - workflowTemplateName.pathTemplate == PROJECT_REGION_WORKFLOW_TEMPLATE_PATH_TEMPLATE, - "toBuilder is only supported when WorkflowTemplateName has the pattern of " - + "projects/{project}/regions/{region}/workflowTemplates/{workflow_template}."); - project = workflowTemplateName.project; - region = workflowTemplateName.region; - 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; - - private 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); - } - } - - @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; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateOrBuilder.java deleted file mode 100644 index 51ed9353..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplateOrBuilder.java +++ /dev/null @@ -1,446 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface WorkflowTemplateOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.WorkflowTemplate) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The template 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 = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * Required. The template 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 = 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.v1beta2.WorkflowTemplatePlacement placement = 7; - * - * @return Whether the placement field is set. - */ - boolean hasPlacement(); - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - * - * @return The placement. - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement getPlacement(); - /** - * - * - *
-   * Required. WorkflowTemplate scheduling information.
-   * 
- * - * .google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement placement = 7; - */ - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacementOrBuilder getPlacementOrBuilder(); - - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - java.util.List getJobsList(); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - com.google.cloud.dataproc.v1beta2.OrderedJob getJobs(int index); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - int getJobsCount(); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - java.util.List - getJobsOrBuilderList(); - /** - * - * - *
-   * Required. The Directed Acyclic Graph of Jobs to submit.
-   * 
- * - * repeated .google.cloud.dataproc.v1beta2.OrderedJob jobs = 8; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.TemplateParameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.dataproc.v1beta2.TemplateParameterOrBuilder getParametersOrBuilder(int index); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacement.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacement.java deleted file mode 100644 index 9dd9d93c..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacement.java +++ /dev/null @@ -1,1175 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * Specifies workflow execution target.
- * Either `managed_cluster` or `cluster_selector` is required.
- * 
- * - * Protobuf type {@code google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement} - */ -public final class WorkflowTemplatePlacement extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster.Builder subBuilder = null; - if (placementCase_ == 1) { - subBuilder = - ((com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_).toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ManagedCluster.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_); - placement_ = subBuilder.buildPartial(); - } - placementCase_ = 1; - break; - } - case 18: - { - com.google.cloud.dataproc.v1beta2.ClusterSelector.Builder subBuilder = null; - if (placementCase_ == 2) { - subBuilder = - ((com.google.cloud.dataproc.v1beta2.ClusterSelector) placement_).toBuilder(); - } - placement_ = - input.readMessage( - com.google.cloud.dataproc.v1beta2.ClusterSelector.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.class, - com.google.cloud.dataproc.v1beta2.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; - /** - * - * - *
-   * Optional. A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - * - * @return Whether the managedCluster field is set. - */ - @java.lang.Override - public boolean hasManagedCluster() { - return placementCase_ == 1; - } - /** - * - * - *
-   * Optional. A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - * - * @return The managedCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedCluster getManagedCluster() { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance(); - } - /** - * - * - *
-   * Optional. A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedClusterOrBuilder getManagedClusterOrBuilder() { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - * - * @return The clusterSelector. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelector getClusterSelector() { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelectorOrBuilder getClusterSelectorOrBuilder() { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster) placement_); - } - if (placementCase_ == 2) { - output.writeMessage(2, (com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster) placement_); - } - if (placementCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.WorkflowTemplatePlacement} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement) - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacementOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.class, - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatesProto - .internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement build() { - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement buildPartial() { - com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.ManagedCluster, - com.google.cloud.dataproc.v1beta2.ManagedCluster.Builder, - com.google.cloud.dataproc.v1beta2.ManagedClusterOrBuilder> - managedClusterBuilder_; - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - * - * @return Whether the managedCluster field is set. - */ - @java.lang.Override - public boolean hasManagedCluster() { - return placementCase_ == 1; - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - * - * @return The managedCluster. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedCluster getManagedCluster() { - if (managedClusterBuilder_ == null) { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance(); - } else { - if (placementCase_ == 1) { - return managedClusterBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - public Builder setManagedCluster(com.google.cloud.dataproc.v1beta2.ManagedCluster value) { - if (managedClusterBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - placement_ = value; - onChanged(); - } else { - managedClusterBuilder_.setMessage(value); - } - placementCase_ = 1; - return this; - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - public Builder setManagedCluster( - com.google.cloud.dataproc.v1beta2.ManagedCluster.Builder builderForValue) { - if (managedClusterBuilder_ == null) { - placement_ = builderForValue.build(); - onChanged(); - } else { - managedClusterBuilder_.setMessage(builderForValue.build()); - } - placementCase_ = 1; - return this; - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - public Builder mergeManagedCluster(com.google.cloud.dataproc.v1beta2.ManagedCluster value) { - if (managedClusterBuilder_ == null) { - if (placementCase_ == 1 - && placement_ - != com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance()) { - placement_ = - com.google.cloud.dataproc.v1beta2.ManagedCluster.newBuilder( - (com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_) - .mergeFrom(value) - .buildPartial(); - } else { - placement_ = value; - } - onChanged(); - } else { - if (placementCase_ == 1) { - managedClusterBuilder_.mergeFrom(value); - } - managedClusterBuilder_.setMessage(value); - } - placementCase_ = 1; - return this; - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.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; - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - public com.google.cloud.dataproc.v1beta2.ManagedCluster.Builder getManagedClusterBuilder() { - return getManagedClusterFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ManagedClusterOrBuilder getManagedClusterOrBuilder() { - if ((placementCase_ == 1) && (managedClusterBuilder_ != null)) { - return managedClusterBuilder_.getMessageOrBuilder(); - } else { - if (placementCase_ == 1) { - return (com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_; - } - return com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance(); - } - } - /** - * - * - *
-     * Optional. A cluster that is managed by the workflow.
-     * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ManagedCluster, - com.google.cloud.dataproc.v1beta2.ManagedCluster.Builder, - com.google.cloud.dataproc.v1beta2.ManagedClusterOrBuilder> - getManagedClusterFieldBuilder() { - if (managedClusterBuilder_ == null) { - if (!(placementCase_ == 1)) { - placement_ = com.google.cloud.dataproc.v1beta2.ManagedCluster.getDefaultInstance(); - } - managedClusterBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ManagedCluster, - com.google.cloud.dataproc.v1beta2.ManagedCluster.Builder, - com.google.cloud.dataproc.v1beta2.ManagedClusterOrBuilder>( - (com.google.cloud.dataproc.v1beta2.ManagedCluster) placement_, - getParentForChildren(), - isClean()); - placement_ = null; - } - placementCase_ = 1; - onChanged(); - ; - return managedClusterBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterSelector, - com.google.cloud.dataproc.v1beta2.ClusterSelector.Builder, - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - * - * @return The clusterSelector. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelector getClusterSelector() { - if (clusterSelectorBuilder_ == null) { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1beta2.ClusterSelector.getDefaultInstance(); - } else { - if (placementCase_ == 2) { - return clusterSelectorBuilder_.getMessage(); - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - public Builder setClusterSelector(com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - public Builder setClusterSelector( - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - public Builder mergeClusterSelector(com.google.cloud.dataproc.v1beta2.ClusterSelector value) { - if (clusterSelectorBuilder_ == null) { - if (placementCase_ == 2 - && placement_ - != com.google.cloud.dataproc.v1beta2.ClusterSelector.getDefaultInstance()) { - placement_ = - com.google.cloud.dataproc.v1beta2.ClusterSelector.newBuilder( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - public com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.ClusterSelectorOrBuilder - getClusterSelectorOrBuilder() { - if ((placementCase_ == 2) && (clusterSelectorBuilder_ != null)) { - return clusterSelectorBuilder_.getMessageOrBuilder(); - } else { - if (placementCase_ == 2) { - return (com.google.cloud.dataproc.v1beta2.ClusterSelector) placement_; - } - return com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterSelector, - com.google.cloud.dataproc.v1beta2.ClusterSelector.Builder, - com.google.cloud.dataproc.v1beta2.ClusterSelectorOrBuilder> - getClusterSelectorFieldBuilder() { - if (clusterSelectorBuilder_ == null) { - if (!(placementCase_ == 2)) { - placement_ = com.google.cloud.dataproc.v1beta2.ClusterSelector.getDefaultInstance(); - } - clusterSelectorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataproc.v1beta2.ClusterSelector, - com.google.cloud.dataproc.v1beta2.ClusterSelector.Builder, - com.google.cloud.dataproc.v1beta2.ClusterSelectorOrBuilder>( - (com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement) - private static final com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.WorkflowTemplatePlacement getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacementOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacementOrBuilder.java deleted file mode 100644 index c6a9ef63..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatePlacementOrBuilder.java +++ /dev/null @@ -1,104 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface WorkflowTemplatePlacementOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - * - * @return Whether the managedCluster field is set. - */ - boolean hasManagedCluster(); - /** - * - * - *
-   * Optional. A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - * - * @return The managedCluster. - */ - com.google.cloud.dataproc.v1beta2.ManagedCluster getManagedCluster(); - /** - * - * - *
-   * Optional. A cluster that is managed by the workflow.
-   * 
- * - * .google.cloud.dataproc.v1beta2.ManagedCluster managed_cluster = 1; - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - * - * @return The clusterSelector. - */ - com.google.cloud.dataproc.v1beta2.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.v1beta2.ClusterSelector cluster_selector = 2; - */ - com.google.cloud.dataproc.v1beta2.ClusterSelectorOrBuilder getClusterSelectorOrBuilder(); - - public com.google.cloud.dataproc.v1beta2.WorkflowTemplatePlacement.PlacementCase - getPlacementCase(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java deleted file mode 100644 index c9429838..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/WorkflowTemplatesProto.java +++ /dev/null @@ -1,638 +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/v1beta2/workflow_templates.proto - -package com.google.cloud.dataproc.v1beta2; - -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_v1beta2_WorkflowTemplate_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_ClusterLabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_ClusterLabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_RegexValidation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_RegexValidation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ValueValidation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ValueValidation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_ParametersEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_ParametersEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_ParametersEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_dataproc_v1beta2_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 = { - "\n6google/cloud/dataproc/v1beta2/workflow" - + "_templates.proto\022\035google.cloud.dataproc." - + "v1beta2\032\034google/api/annotations.proto\032\027g" - + "oogle/api/client.proto\032\037google/api/field" - + "_behavior.proto\032\031google/api/resource.pro" - + "to\032,google/cloud/dataproc/v1beta2/cluste" - + "rs.proto\032(google/cloud/dataproc/v1beta2/" - + "jobs.proto\032#google/longrunning/operation" - + "s.proto\032\033google/protobuf/empty.proto\032\037go" - + "ogle/protobuf/timestamp.proto\"\327\005\n\020Workfl" - + "owTemplate\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_t" - + "ime\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340" - + "A\003\0224\n\013update_time\030\005 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\022P\n\006labels\030\006 \003(\0132;.googl" - + "e.cloud.dataproc.v1beta2.WorkflowTemplat" - + "e.LabelsEntryB\003\340A\001\022K\n\tplacement\030\007 \001(\01328." - + "google.cloud.dataproc.v1beta2.WorkflowTe" - + "mplatePlacement\0227\n\004jobs\030\010 \003(\0132).google.c" - + "loud.dataproc.v1beta2.OrderedJob\022I\n\npara" - + "meters\030\t \003(\01320.google.cloud.dataproc.v1b" - + "eta2.TemplateParameterB\003\340A\001\032-\n\013LabelsEnt" - + "ry\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.com/WorkflowTempl" - + "ate\022Iprojects/{project}/regions/{region}" - + "/workflowTemplates/{workflow_template}\022M" - + "projects/{project}/locations/{location}/" - + "workflowTemplates/{workflow_template} \001\"" - + "\276\001\n\031WorkflowTemplatePlacement\022H\n\017managed" - + "_cluster\030\001 \001(\0132-.google.cloud.dataproc.v" - + "1beta2.ManagedClusterH\000\022J\n\020cluster_selec" - + "tor\030\002 \001(\0132..google.cloud.dataproc.v1beta" - + "2.ClusterSelectorH\000B\013\n\tplacement\"\336\001\n\016Man" - + "agedCluster\022\024\n\014cluster_name\030\002 \001(\t\022<\n\006con" - + "fig\030\003 \001(\0132,.google.cloud.dataproc.v1beta" - + "2.ClusterConfig\022I\n\006labels\030\004 \003(\01329.google" - + ".cloud.dataproc.v1beta2.ManagedCluster.L" - + "abelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\t:\0028\001\"\260\001\n\017ClusterSelector\022\014\n" - + "\004zone\030\001 \001(\t\022Y\n\016cluster_labels\030\002 \003(\0132A.go" - + "ogle.cloud.dataproc.v1beta2.ClusterSelec" - + "tor.ClusterLabelsEntry\0324\n\022ClusterLabelsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\220\006\n" - + "\nOrderedJob\022\024\n\007step_id\030\001 \001(\tB\003\340A\002\022>\n\nhad" - + "oop_job\030\002 \001(\0132(.google.cloud.dataproc.v1" - + "beta2.HadoopJobH\000\022<\n\tspark_job\030\003 \001(\0132\'.g" - + "oogle.cloud.dataproc.v1beta2.SparkJobH\000\022" - + "@\n\013pyspark_job\030\004 \001(\0132).google.cloud.data" - + "proc.v1beta2.PySparkJobH\000\022:\n\010hive_job\030\005 " - + "\001(\0132&.google.cloud.dataproc.v1beta2.Hive" - + "JobH\000\0228\n\007pig_job\030\006 \001(\0132%.google.cloud.da" - + "taproc.v1beta2.PigJobH\000\022?\n\013spark_r_job\030\013" - + " \001(\0132(.google.cloud.dataproc.v1beta2.Spa" - + "rkRJobH\000\022C\n\rspark_sql_job\030\007 \001(\0132*.google" - + ".cloud.dataproc.v1beta2.SparkSqlJobH\000\022>\n" - + "\npresto_job\030\014 \001(\0132(.google.cloud.datapro" - + "c.v1beta2.PrestoJobH\000\022J\n\006labels\030\010 \003(\01325." - + "google.cloud.dataproc.v1beta2.OrderedJob" - + ".LabelsEntryB\003\340A\001\022E\n\nscheduling\030\t \001(\0132,." - + "google.cloud.dataproc.v1beta2.JobSchedul" - + "ingB\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\005valu" - + "e\030\002 \001(\t:\0028\001B\n\n\010job_type\"\216\001\n\021TemplatePara" - + "meter\022\014\n\004name\030\001 \001(\t\022\016\n\006fields\030\002 \003(\t\022\023\n\013d" - + "escription\030\003 \001(\t\022F\n\nvalidation\030\004 \001(\01322.g" - + "oogle.cloud.dataproc.v1beta2.ParameterVa" - + "lidation\"\253\001\n\023ParameterValidation\022?\n\005rege" - + "x\030\001 \001(\0132..google.cloud.dataproc.v1beta2." - + "RegexValidationH\000\022@\n\006values\030\002 \001(\0132..goog" - + "le.cloud.dataproc.v1beta2.ValueValidatio" - + "nH\000B\021\n\017validation_type\"\"\n\017RegexValidatio" - + "n\022\017\n\007regexes\030\001 \003(\t\"!\n\017ValueValidation\022\016\n" - + "\006values\030\001 \003(\t\"\310\005\n\020WorkflowMetadata\022\025\n\010te" - + "mplate\030\001 \001(\tB\003\340A\003\022\024\n\007version\030\002 \001(\005B\003\340A\003\022" - + "L\n\016create_cluster\030\003 \001(\0132/.google.cloud.d" - + "ataproc.v1beta2.ClusterOperationB\003\340A\003\022@\n" - + "\005graph\030\004 \001(\0132,.google.cloud.dataproc.v1b" - + "eta2.WorkflowGraphB\003\340A\003\022L\n\016delete_cluste" - + "r\030\005 \001(\0132/.google.cloud.dataproc.v1beta2." - + "ClusterOperationB\003\340A\003\022I\n\005state\030\006 \001(\01625.g" - + "oogle.cloud.dataproc.v1beta2.WorkflowMet" - + "adata.StateB\003\340A\003\022\031\n\014cluster_name\030\007 \001(\tB\003" - + "\340A\003\022S\n\nparameters\030\010 \003(\0132?.google.cloud.d" - + "ataproc.v1beta2.WorkflowMetadata.Paramet" - + "ersEntry\0223\n\nstart_time\030\t \001(\0132\032.google.pr" - + "otobuf.TimestampB\003\340A\003\0221\n\010end_time\030\n \001(\0132" - + "\032.google.protobuf.TimestampB\003\340A\003\022\031\n\014clus" - + "ter_uuid\030\013 \001(\tB\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\"P\n\rWorkflowGraph\022?\n\005nodes" - + "\030\001 \003(\0132+.google.cloud.dataproc.v1beta2.W" - + "orkflowNodeB\003\340A\003\"\251\002\n\014WorkflowNode\022\024\n\007ste" - + "p_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\022I\n\005stat" - + "e\030\005 \001(\01625.google.cloud.dataproc.v1beta2." - + "WorkflowNode.NodeStateB\003\340A\003\022\022\n\005error\030\006 \001" - + "(\tB\003\340A\003\"k\n\tNodeState\022\033\n\027NODE_STATUS_UNSP" - + "ECIFIED\020\000\022\013\n\007BLOCKED\020\001\022\014\n\010RUNNABLE\020\002\022\013\n\007" - + "RUNNING\020\003\022\r\n\tCOMPLETED\020\004\022\n\n\006FAILED\020\005\"\251\001\n" - + "\035CreateWorkflowTemplateRequest\022@\n\006parent" - + "\030\001 \001(\tB0\340A\002\372A*\022(dataproc.googleapis.com/" - + "WorkflowTemplate\022F\n\010template\030\002 \001(\0132/.goo" - + "gle.cloud.dataproc.v1beta2.WorkflowTempl" - + "ateB\003\340A\002\"m\n\032GetWorkflowTemplateRequest\022>" - + "\n\004name\030\001 \001(\tB0\340A\002\372A*\n(dataproc.googleapi" - + "s.com/WorkflowTemplate\022\017\n\007version\030\002 \001(\005\"" - + "\274\002\n\"InstantiateWorkflowTemplateRequest\022>" - + "\n\004name\030\001 \001(\tB0\340A\002\372A*\n(dataproc.googleapi" - + "s.com/WorkflowTemplate\022\017\n\007version\030\002 \001(\005\022" - + "\027\n\013instance_id\030\003 \001(\tB\002\030\001\022\022\n\nrequest_id\030\005" - + " \001(\t\022e\n\nparameters\030\004 \003(\0132Q.google.cloud." - + "dataproc.v1beta2.InstantiateWorkflowTemp" - + "lateRequest.ParametersEntry\0321\n\017Parameter" - + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\335" - + "\001\n(InstantiateInlineWorkflowTemplateRequ" - + "est\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(dataproc.go" - + "ogleapis.com/WorkflowTemplate\022F\n\010templat" - + "e\030\002 \001(\0132/.google.cloud.dataproc.v1beta2." - + "WorkflowTemplateB\003\340A\002\022\023\n\013instance_id\030\003 \001" - + "(\t\022\022\n\nrequest_id\030\004 \001(\t\"g\n\035UpdateWorkflow" - + "TemplateRequest\022F\n\010template\030\001 \001(\0132/.goog" - + "le.cloud.dataproc.v1beta2.WorkflowTempla" - + "teB\003\340A\002\"\207\001\n\034ListWorkflowTemplatesRequest" - + "\022@\n\006parent\030\001 \001(\tB0\340A\002\372A*\022(dataproc.googl" - + "eapis.com/WorkflowTemplate\022\021\n\tpage_size\030" - + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\206\001\n\035ListWorkfl" - + "owTemplatesResponse\022G\n\ttemplates\030\001 \003(\0132/" - + ".google.cloud.dataproc.v1beta2.WorkflowT" - + "emplateB\003\340A\003\022\034\n\017next_page_token\030\002 \001(\tB\003\340" - + "A\003\"p\n\035DeleteWorkflowTemplateRequest\022>\n\004n" - + "ame\030\001 \001(\tB0\340A\002\372A*\n(dataproc.googleapis.c" - + "om/WorkflowTemplate\022\017\n\007version\030\002 \001(\0052\351\021\n" - + "\027WorkflowTemplateService\022\260\002\n\026CreateWorkf" - + "lowTemplate\022<.google.cloud.dataproc.v1be" - + "ta2.CreateWorkflowTemplateRequest\032/.goog" - + "le.cloud.dataproc.v1beta2.WorkflowTempla" - + "te\"\246\001\202\323\344\223\002\214\001\"8/v1beta2/{parent=projects/" - + "*/regions/*}/workflowTemplates:\010template" - + "ZF\":/v1beta2/{parent=projects/*/location" - + "s/*}/workflowTemplates:\010template\332A\020paren" - + "t, template\022\211\002\n\023GetWorkflowTemplate\0229.go" - + "ogle.cloud.dataproc.v1beta2.GetWorkflowT" - + "emplateRequest\032/.google.cloud.dataproc.v" - + "1beta2.WorkflowTemplate\"\205\001\202\323\344\223\002x\0228/v1bet" - + "a2/{name=projects/*/regions/*/workflowTe" - + "mplates/*}Z<\022:/v1beta2/{name=projects/*/" - + "locations/*/workflowTemplates/*}\332A\004name\022" - + "\345\002\n\033InstantiateWorkflowTemplate\022A.google" - + ".cloud.dataproc.v1beta2.InstantiateWorkf" - + "lowTemplateRequest\032\035.google.longrunning." - + "Operation\"\343\001\202\323\344\223\002\226\001\"D/v1beta2/{name=proj" - + "ects/*/regions/*/workflowTemplates/*}:in" - + "stantiate:\001*ZK\"F/v1beta2/{name=projects/" - + "*/locations/*/workflowTemplates/*}:insta" - + "ntiate:\001*\332A\004name\332A\020name, parameters\312A)\n\025" - + "google.protobuf.Empty\022\020WorkflowMetadata\022" - + "\204\003\n!InstantiateInlineWorkflowTemplate\022G." - + "google.cloud.dataproc.v1beta2.Instantiat" - + "eInlineWorkflowTemplateRequest\032\035.google." - + "longrunning.Operation\"\366\001\202\323\344\223\002\260\001\"L/v1beta" - + "2/{parent=projects/*/locations/*}/workfl" - + "owTemplates:instantiateInline:\010templateZ" - + "V\"J/v1beta2/{parent=projects/*/regions/*" - + "}/workflowTemplates:instantiateInline:\010t" - + "emplate\332A\020parent, template\312A)\n\025google.pr" - + "otobuf.Empty\022\020WorkflowMetadata\022\272\002\n\026Updat" - + "eWorkflowTemplate\022<.google.cloud.datapro" - + "c.v1beta2.UpdateWorkflowTemplateRequest\032" - + "/.google.cloud.dataproc.v1beta2.Workflow" - + "Template\"\260\001\202\323\344\223\002\236\001\032A/v1beta2/{template.n" - + "ame=projects/*/regions/*/workflowTemplat" - + "es/*}:\010templateZO\032C/v1beta2/{template.na" - + "me=projects/*/locations/*/workflowTempla" - + "tes/*}:\010template\332A\010template\022\234\002\n\025ListWork" - + "flowTemplates\022;.google.cloud.dataproc.v1" - + "beta2.ListWorkflowTemplatesRequest\032<.goo" - + "gle.cloud.dataproc.v1beta2.ListWorkflowT" - + "emplatesResponse\"\207\001\202\323\344\223\002x\0228/v1beta2/{par" - + "ent=projects/*/regions/*}/workflowTempla" - + "tesZ<\022:/v1beta2/{parent=projects/*/locat" - + "ions/*}/workflowTemplates\332A\006parent\022\366\001\n\026D" - + "eleteWorkflowTemplate\022<.google.cloud.dat" - + "aproc.v1beta2.DeleteWorkflowTemplateRequ" - + "est\032\026.google.protobuf.Empty\"\205\001\202\323\344\223\002x*8/v" - + "1beta2/{name=projects/*/regions/*/workfl" - + "owTemplates/*}Z<*:/v1beta2/{name=project" - + "s/*/locations/*/workflowTemplates/*}\332A\004n" - + "ame\032K\312A\027dataproc.googleapis.com\322A.https:" - + "//www.googleapis.com/auth/cloud-platform" - + "B\204\001\n!com.google.cloud.dataproc.v1beta2B\026" - + "WorkflowTemplatesProtoP\001ZEgoogle.golang." - + "org/genproto/googleapis/cloud/dataproc/v" - + "1beta2;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.v1beta2.ClustersProto.getDescriptor(), - com.google.cloud.dataproc.v1beta2.JobsProto.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_descriptor, - new java.lang.String[] { - "Id", - "Name", - "Version", - "CreateTime", - "UpdateTime", - "Labels", - "Placement", - "Jobs", - "Parameters", - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplate_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowTemplatePlacement_descriptor, - new java.lang.String[] { - "ManagedCluster", "ClusterSelector", "Placement", - }); - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_descriptor, - new java.lang.String[] { - "ClusterName", "Config", "Labels", - }); - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ManagedCluster_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_descriptor, - new java.lang.String[] { - "Zone", "ClusterLabels", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_ClusterLabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_ClusterLabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterSelector_ClusterLabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_descriptor, - new java.lang.String[] { - "StepId", - "HadoopJob", - "SparkJob", - "PysparkJob", - "HiveJob", - "PigJob", - "SparkRJob", - "SparkSqlJob", - "PrestoJob", - "Labels", - "Scheduling", - "PrerequisiteStepIds", - "JobType", - }); - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_LabelsEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_OrderedJob_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_TemplateParameter_descriptor, - new java.lang.String[] { - "Name", "Fields", "Description", "Validation", - }); - internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ParameterValidation_descriptor, - new java.lang.String[] { - "Regex", "Values", "ValidationType", - }); - internal_static_google_cloud_dataproc_v1beta2_RegexValidation_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_dataproc_v1beta2_RegexValidation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_RegexValidation_descriptor, - new java.lang.String[] { - "Regexes", - }); - internal_static_google_cloud_dataproc_v1beta2_ValueValidation_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_dataproc_v1beta2_ValueValidation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ValueValidation_descriptor, - new java.lang.String[] { - "Values", - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_descriptor, - new java.lang.String[] { - "Template", - "Version", - "CreateCluster", - "Graph", - "DeleteCluster", - "State", - "ClusterName", - "Parameters", - "StartTime", - "EndTime", - "ClusterUuid", - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_ParametersEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_ParametersEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowMetadata_ParametersEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ClusterOperation_descriptor, - new java.lang.String[] { - "OperationId", "Error", "Done", - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowGraph_descriptor, - new java.lang.String[] { - "Nodes", - }); - internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_WorkflowNode_descriptor, - new java.lang.String[] { - "StepId", "PrerequisiteStepIds", "JobId", "State", "Error", - }); - internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_CreateWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Parent", "Template", - }); - internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_GetWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Name", "Version", - }); - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Name", "Version", "InstanceId", "RequestId", "Parameters", - }); - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor = - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_ParametersEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_InstantiateWorkflowTemplateRequest_ParametersEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_InstantiateInlineWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Parent", "Template", "InstanceId", "RequestId", - }); - internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_UpdateWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Template", - }); - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_ListWorkflowTemplatesResponse_descriptor, - new java.lang.String[] { - "Templates", "NextPageToken", - }); - internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_dataproc_v1beta2_DeleteWorkflowTemplateRequest_descriptor, - new java.lang.String[] { - "Name", "Version", - }); - 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.v1beta2.ClustersProto.getDescriptor(); - com.google.cloud.dataproc.v1beta2.JobsProto.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-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplication.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplication.java deleted file mode 100644 index de8165eb..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplication.java +++ /dev/null @@ -1,1395 +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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -/** - * - * - *
- * 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.v1beta2.YarnApplication} - */ -public final class YarnApplication extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_YarnApplication_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_YarnApplication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.YarnApplication.class, - com.google.cloud.dataproc.v1beta2.YarnApplication.Builder.class); - } - - /** - * - * - *
-   * The application state, corresponding to
-   * <code>YarnProtos.YarnApplicationStateProto</code>.
-   * 
- * - * Protobuf enum {@code google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.YarnApplication.State) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The application name.
-   * 
- * - * 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 application name.
-   * 
- * - * 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 STATE_FIELD_NUMBER = 2; - private int state_; - /** - * - * - *
-   * Output only. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.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 application state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.YarnApplication.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.YarnApplication.State result = - com.google.cloud.dataproc.v1beta2.YarnApplication.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.YarnApplication.State.UNRECOGNIZED - : result; - } - - public static final int PROGRESS_FIELD_NUMBER = 3; - private float progress_; - /** - * - * - *
-   * Output only. The numerical progress of the application, from 1 to 100.
-   * 
- * - * float progress = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @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_; - /** - * - * - *
-   * Output only. 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) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-   * Output only. 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) = OUTPUT_ONLY]; - * - * @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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (state_ - != com.google.cloud.dataproc.v1beta2.YarnApplication.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(2, state_); - } - if (progress_ != 0F) { - output.writeFloat(3, progress_); - } - if (!getTrackingUrlBytes().isEmpty()) { - 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 (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (state_ - != com.google.cloud.dataproc.v1beta2.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 (!getTrackingUrlBytes().isEmpty()) { - 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.v1beta2.YarnApplication)) { - return super.equals(obj); - } - com.google.cloud.dataproc.v1beta2.YarnApplication other = - (com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.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.v1beta2.YarnApplication} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1beta2.YarnApplication) - com.google.cloud.dataproc.v1beta2.YarnApplicationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_YarnApplication_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataproc.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_YarnApplication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataproc.v1beta2.YarnApplication.class, - com.google.cloud.dataproc.v1beta2.YarnApplication.Builder.class); - } - - // Construct using com.google.cloud.dataproc.v1beta2.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.v1beta2.JobsProto - .internal_static_google_cloud_dataproc_v1beta2_YarnApplication_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.YarnApplication getDefaultInstanceForType() { - return com.google.cloud.dataproc.v1beta2.YarnApplication.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.YarnApplication build() { - com.google.cloud.dataproc.v1beta2.YarnApplication result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.YarnApplication buildPartial() { - com.google.cloud.dataproc.v1beta2.YarnApplication result = - new com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication) { - return mergeFrom((com.google.cloud.dataproc.v1beta2.YarnApplication) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.dataproc.v1beta2.YarnApplication other) { - if (other == com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.dataproc.v1beta2.YarnApplication) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The application name.
-     * 
- * - * 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 application name.
-     * 
- * - * 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 application name.
-     * 
- * - * 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 application name.
-     * 
- * - * 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 application name.
-     * 
- * - * 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 state_ = 0; - /** - * - * - *
-     * Output only. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.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 application state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.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 application state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataproc.v1beta2.YarnApplication.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.dataproc.v1beta2.YarnApplication.State result = - com.google.cloud.dataproc.v1beta2.YarnApplication.State.valueOf(state_); - return result == null - ? com.google.cloud.dataproc.v1beta2.YarnApplication.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.dataproc.v1beta2.YarnApplication.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The application state.
-     * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private float progress_; - /** - * - * - *
-     * Output only. The numerical progress of the application, from 1 to 100.
-     * 
- * - * float progress = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The progress. - */ - @java.lang.Override - public float getProgress() { - return progress_; - } - /** - * - * - *
-     * Output only. The numerical progress of the application, from 1 to 100.
-     * 
- * - * float progress = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The progress to set. - * @return This builder for chaining. - */ - public Builder setProgress(float value) { - - progress_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The numerical progress of the application, from 1 to 100.
-     * 
- * - * float progress = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearProgress() { - - progress_ = 0F; - onChanged(); - return this; - } - - private java.lang.Object trackingUrl_ = ""; - /** - * - * - *
-     * Output only. 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) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. 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) = OUTPUT_ONLY]; - * - * @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; - } - } - /** - * - * - *
-     * Output only. 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) = OUTPUT_ONLY]; - * - * @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; - } - /** - * - * - *
-     * Output only. 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) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearTrackingUrl() { - - trackingUrl_ = getDefaultInstance().getTrackingUrl(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. 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) = OUTPUT_ONLY]; - * - * @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.v1beta2.YarnApplication) - } - - // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1beta2.YarnApplication) - private static final com.google.cloud.dataproc.v1beta2.YarnApplication DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1beta2.YarnApplication(); - } - - public static com.google.cloud.dataproc.v1beta2.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.v1beta2.YarnApplication getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplicationOrBuilder.java b/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/YarnApplicationOrBuilder.java deleted file mode 100644 index 438157a4..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/java/com/google/cloud/dataproc/v1beta2/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/v1beta2/jobs.proto - -package com.google.cloud.dataproc.v1beta2; - -public interface YarnApplicationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.dataproc.v1beta2.YarnApplication) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The application name.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The application name.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. The application state.
-   * 
- * - * - * .google.cloud.dataproc.v1beta2.YarnApplication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.dataproc.v1beta2.YarnApplication.State getState(); - - /** - * - * - *
-   * Output only. The numerical progress of the application, from 1 to 100.
-   * 
- * - * float progress = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The progress. - */ - float getProgress(); - - /** - * - * - *
-   * Output only. 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) = OUTPUT_ONLY]; - * - * @return The trackingUrl. - */ - java.lang.String getTrackingUrl(); - /** - * - * - *
-   * Output only. 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) = OUTPUT_ONLY]; - * - * @return The bytes for trackingUrl. - */ - com.google.protobuf.ByteString getTrackingUrlBytes(); -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto deleted file mode 100644 index a7d6376b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/autoscaling_policies.proto +++ /dev/null @@ -1,349 +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. - -syntax = "proto3"; - -package google.cloud.dataproc.v1beta2; - -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/v1beta2;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "AutoscalingPoliciesProto"; -option java_package = "com.google.cloud.dataproc.v1beta2"; -option (google.api.resource_definition) = { - type: "dataproc.googleapis.com/Region" - pattern: "projects/{project}/regions/{region}" -}; - -// The API interface for managing autoscaling policies in the -// Cloud 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: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies" - body: "policy" - additional_bindings { - post: "/v1beta2/{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: "/v1beta2/{policy.name=projects/*/locations/*/autoscalingPolicies/*}" - body: "policy" - additional_bindings { - put: "/v1beta2/{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: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}" - additional_bindings { - get: "/v1beta2/{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: "/v1beta2/{parent=projects/*/locations/*}/autoscalingPolicies" - additional_bindings { - get: "/v1beta2/{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: "/v1beta2/{name=projects/*/locations/*/autoscalingPolicies/*}" - additional_bindings { - delete: "/v1beta2/{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}" - history: ORIGINALLY_SINGLE_PATTERN - }; - - // 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 [(google.api.field_behavior) = REQUIRED]; - - // 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]; - - // Required. Autoscaling algorithm for policy. - oneof algorithm { - BasicAutoscalingAlgorithm basic_algorithm = 3; - } - - // 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]; -} - -// 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 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). - // - // Bounds: [0.0, 1.0]. - double scale_up_factor = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. Fraction of average 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. - // - // 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]; - - // Optional. 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, ). Required. - // Secondary workers - Bounds: [min_instances, ). Default: 0. - int32 max_instances = 2 [(google.api.field_behavior) = OPTIONAL]; - - // 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 - // has the following format: - // `projects/{project_id}/regions/{region}` - // - // * For `projects.locations.autoscalingPolicies.create`, the resource name - // 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-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/clusters.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/clusters.proto deleted file mode 100644 index 93e6fe79..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/clusters.proto +++ /dev/null @@ -1,996 +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. - -syntax = "proto3"; - -package google.cloud.dataproc.v1beta2; - -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/v1beta2/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/v1beta2;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "ClustersProto"; -option java_package = "com.google.cloud.dataproc.v1beta2"; - -// 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.v1beta2#clusteroperationmetadata). - rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta2/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.v1beta2.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.v1beta2#clusteroperationmetadata). - rpc UpdateCluster(UpdateClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta2/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.v1beta2.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.v1beta2#clusteroperationmetadata). - rpc DeleteCluster(DeleteClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta2/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.v1beta2.ClusterOperationMetadata" - }; - } - - // Gets the resource representation for a cluster in a project. - rpc GetCluster(GetClusterRequest) returns (Cluster) { - option (google.api.http) = { - get: "/v1beta2/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: "/v1beta2/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.v1beta2#clusteroperationmetadata). - // After the operation completes, - // [Operation.response][google.longrunning.Operation.response] - // contains - // [Empty][google.protobuf.Empty]. - rpc DiagnoseCluster(DiagnoseClusterRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta2/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: "google.protobuf.Empty" - metadata_type: "google.cloud.dataproc.v1beta2.ClusterOperationMetadata" - }; - } -} - -// Describes the identifying information, config, and status of -// a cluster of Compute Engine instances. -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]; - - // Required. The cluster config. Note that Dataproc may set - // default values, and values may change when clusters are updated. - ClusterConfig config = 3 [(google.api.field_behavior) = REQUIRED]; - - // 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 - // bucket](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)). - string config_bucket = 1 [(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 master instance in a cluster. - InstanceGroupConfig master_config = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // worker instances in a cluster. - InstanceGroupConfig worker_config = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine config settings for - // additional worker instances in a cluster. - InstanceGroupConfig secondary_worker_config = 12 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The config settings for software inside the cluster. - SoftwareConfig software_config = 13 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The config setting for auto delete cluster schedule. - LifecycleConfig lifecycle_config = 14 [(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/v1beta2/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 = 16 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Port/endpoint configuration for this cluster - EndpointConfig endpoint_config = 17 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Security related configuration. - SecurityConfig security_config = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Kubernetes Engine config for Dataproc clusters deployed to Kubernetes. - // Setting this is considered mutually exclusive with Compute Engine-based - // options such as `gce_cluster_config`, `master_config`, `worker_config`, - // `secondary_worker_config`, and `autoscaling_config`. - GkeClusterConfig gke_cluster_config = 19 [(google.api.field_behavior) = OPTIONAL]; -} - -// The GKE config for this cluster. -message GkeClusterConfig { - // A full, namespace-isolated deployment target for an existing GKE cluster. - message NamespacedGkeDeploymentTarget { - // Optional. The target GKE cluster to deploy to. - // Format: 'projects/{project}/locations/{location}/clusters/{cluster_id}' - string target_gke_cluster = 1 [ - (google.api.field_behavior) = OPTIONAL, - (google.api.resource_reference) = { - type: "container.googleapis.com/Cluster" - } - ]; - - // Optional. A namespace within the GKE cluster to deploy into. - string cluster_namespace = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. A target for the deployment. - NamespacedGkeDeploymentTarget namespaced_gke_deployment_target = 1 [(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 { - // 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 [Dataproc service - // account](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_cloud_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]; -} - -// The config settings for Compute Engine resources in -// an instance group, such as a master or worker group. -message InstanceGroupConfig { - // Optional. The number of VM instances in the instance group. - // For master instance 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]; - - // 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]; - - // 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; -} - -// 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 group (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-ssd" (Persistent Disk Solid State Drive) or - // "pd-standard" (Persistent Disk Hard Disk Drive). - 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]; - - // 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; -} - -// 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 10 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]; -} - -// Security related configuration, including encryption, Kerberos, etc. -message SecurityConfig { - // Kerberos related configuration. - KerberosConfig kerberos_config = 1; -} - -// 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]; - - // Required. The Cloud Storage URI of a KMS encrypted file containing the root - // principal password. - string root_principal_password_uri = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The uri of the KMS key used to encrypt various sensitive - // files. - string kms_key_uri = 3 [(google.api.field_behavior) = REQUIRED]; - - // 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]; -} - -// 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. - RUNNING = 2; - - // The cluster encountered an error. It is not ready for use. - ERROR = 3; - - // 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]; - - // Output only. Optional details of cluster's state. - string detail = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // 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]; -} - -// 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_cloud_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]; - - // The set of optional components to activate on the cluster. - repeated Component optional_components = 3; -} - -// 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][google.cloud.dataproc.v1beta2.CreateClusterRequest] requests 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]; -} - -// 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
labelsUpdates labels
config.worker_config.num_instancesResize primary worker - // group
config.secondary_worker_config.num_instancesResize secondary - // worker group
config.lifecycle_config.auto_delete_ttlReset MAX TTL - // duration
config.lifecycle_config.auto_delete_timeUpdate MAX TTL - // deletion timestamp
config.lifecycle_config.idle_delete_ttlUpdate Idle TTL - // duration
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][google.cloud.dataproc.v1beta2.UpdateClusterRequest] requests 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 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][google.cloud.dataproc.v1beta2.DeleteClusterRequest] requests 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-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/jobs.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/jobs.proto deleted file mode 100644 index 9d9aaae0..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/jobs.proto +++ /dev/null @@ -1,902 +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. - -syntax = "proto3"; - -package google.cloud.dataproc.v1beta2; - -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/v1beta2;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "JobsProto"; -option java_package = "com.google.cloud.dataproc.v1beta2"; - -// 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: "/v1beta2/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: "/v1beta2/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: "/v1beta2/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: "/v1beta2/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: "/v1beta2/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/v1beta2/projects.regions.jobs/list) - // or - // [regions/{region}/jobs.get](https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get). - rpc CancelJob(CancelJobRequest) returns (Job) { - option (google.api.http) = { - post: "/v1beta2/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: "/v1beta2/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](http://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. -// 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`. -message SparkJob { - 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 copied to the working directory of - // Spark 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 Spark drivers and tasks. 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 copied to the working directory of - // Python 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 - // .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 terminate a query - // with a semicolon. Multiple queries can be specified in one string - // by separating each with a semicolon. Here is an example of an Cloud - // 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 copied to the working directory of - // R drivers and distributed tasks. Useful for naively parallel tasks. - repeated string file_uris = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. HCFS URIs of archives to be extracted in the working directory of - // Spark drivers and tasks. 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]; -} - -// 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]; - - // Output only. Optional Job state details, such as an error - // description if the state is ERROR. - string details = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // 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 { - // Required. The ID of the Google Cloud Platform project that the job - // belongs to. - string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // 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; - } - - // Output only. The application name. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The application state. - State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The numerical progress of the application, from 1 to 100. - float progress = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. 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) = OUTPUT_ONLY]; -} - -// 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. The email address of the user submitting the job. For jobs - // submitted on the cluster, the address is username@hostname. - string submitted_by = 10 [(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 terminating 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. - int32 max_failures_per_hour = 1 [(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 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][google.cloud.dataproc.v1beta2.SubmitJobRequest] requests with the same - // id, then the second request will be ignored and the - // first [Job][google.cloud.dataproc.v1beta2.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]; -} - -// 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-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/operations.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/operations.proto deleted file mode 100644 index 2e98fb82..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/operations.proto +++ /dev/null @@ -1,82 +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. - -syntax = "proto3"; - -package google.cloud.dataproc.v1beta2; - -import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.cloud.dataproc.v1beta2"; - -// 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; - - // Output only. A message containing the detailed operation state. - string inner_state = 2; - - // Output only. A message containing any operation metadata details. - string details = 3; - - // Output only. The time this state was entered. - google.protobuf.Timestamp state_start_time = 4; -} - -// Metadata describing the operation. -message ClusterOperationMetadata { - // Output only. Name of the cluster for the operation. - string cluster_name = 7; - - // Output only. Cluster UUID for the operation. - string cluster_uuid = 8; - - // Output only. Current operation status. - ClusterOperationStatus status = 9; - - // Output only. The previous operation status. - repeated ClusterOperationStatus status_history = 10; - - // Output only. The operation type. - string operation_type = 11; - - // Output only. Short description of operation. - string description = 12; - - // Output only. Labels associated with the operation - map labels = 13; - - // Output only. Errors encountered during operation execution. - repeated string warnings = 14; -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/shared.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/shared.proto deleted file mode 100644 index 130ae554..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/shared.proto +++ /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 -// -// 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.v1beta2; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/dataproc/v1beta2;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "SharedProto"; -option java_package = "com.google.cloud.dataproc.v1beta2"; - -// Cluster components that can be activated. -enum Component { - // Unspecified component. - COMPONENT_UNSPECIFIED = 0; - - // The Anaconda python distribution. - ANACONDA = 5; - - // Docker - DOCKER = 13; - - // The Druid query engine. - DRUID = 9; - - // Flink - FLINK = 14; - - // The Hive Web HCatalog (the REST service for accessing HCatalog). - HIVE_WEBHCAT = 3; - - // The Jupyter Notebook. - JUPYTER = 1; - - // The Kerberos security feature. - KERBEROS = 7; - - // 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; -} diff --git a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto b/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto deleted file mode 100644 index e5ef680b..00000000 --- a/proto-google-cloud-dataproc-v1beta2/src/main/proto/google/cloud/dataproc/v1beta2/workflow_templates.proto +++ /dev/null @@ -1,789 +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. - -syntax = "proto3"; - -package google.cloud.dataproc.v1beta2; - -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/v1beta2/clusters.proto"; -import "google/cloud/dataproc/v1beta2/jobs.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/v1beta2;dataproc"; -option java_multiple_files = true; -option java_outer_classname = "WorkflowTemplatesProto"; -option java_package = "com.google.cloud.dataproc.v1beta2"; - -// 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: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates" - body: "template" - additional_bindings { - post: "/v1beta2/{parent=projects/*/locations/*}/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: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}" - additional_bindings { - get: "/v1beta2/{name=projects/*/locations/*/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.v1beta2#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: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}:instantiate" - body: "*" - additional_bindings { - post: "/v1beta2/{name=projects/*/locations/*/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.v1beta2.WorkflowTemplateService.CreateWorkflowTemplate], [InstantiateWorkflowTemplate][google.cloud.dataproc.v1beta2.WorkflowTemplateService.InstantiateWorkflowTemplate], - // [DeleteWorkflowTemplate][google.cloud.dataproc.v1beta2.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: "/v1beta2/{parent=projects/*/locations/*}/workflowTemplates:instantiateInline" - body: "template" - additional_bindings { - post: "/v1beta2/{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: "/v1beta2/{template.name=projects/*/regions/*/workflowTemplates/*}" - body: "template" - additional_bindings { - put: "/v1beta2/{template.name=projects/*/locations/*/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: "/v1beta2/{parent=projects/*/regions/*}/workflowTemplates" - additional_bindings { - get: "/v1beta2/{parent=projects/*/locations/*}/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: "/v1beta2/{name=projects/*/regions/*/workflowTemplates/*}" - additional_bindings { - delete: "/v1beta2/{name=projects/*/locations/*/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 - }; - - // Required. The template 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 = 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; - - // Required. The Directed Acyclic Graph of Jobs to submit. - repeated OrderedJob jobs = 8; - - // 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]; -} - -// 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 { - // Optional. 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; - - // Required. The cluster configuration. - ClusterConfig config = 3; - - // 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; -} - -// 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; - - // Required. The cluster labels. Cluster must have all labels - // to match. - map cluster_labels = 2; -} - -// 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.v1beta2.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 { - HadoopJob hadoop_job = 2; - - SparkJob spark_job = 3; - - PySparkJob pyspark_job = 4; - - HiveJob hive_job = 5; - - PigJob pig_job = 6; - - // Spark R job - SparkRJob spark_r_job = 11; - - SparkSqlJob spark_sql_job = 7; - - // Presto job - PrestoJob presto_job = 12; - } - - // 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; - - // 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; - - // Optional. Brief description of the parameter. - // Must not exceed 1024 characters. - string description = 3; - - // Optional. Validation rules to be applied to this parameter's value. - ParameterValidation validation = 4; -} - -// 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; -} - -// Validation based on a list of allowed values. -message ValueValidation { - // Required. List of allowed values for the parameter. - repeated string values = 1; -} - -// 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]; -} - -// 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_STATUS_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; -} - -// 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; - - // Deprecated. Please use `request_id` field instead. - string instance_id = 3 [deprecated = true]; - - // 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; - - // Optional. Map from parameter names to values that should be used for those - // parameters. Values may not exceed 100 characters. - map parameters = 4; -} - -// 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]; - - // Deprecated. Please use `request_id` field instead. - string instance_id = 3; - - // 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 = 4; -} - -// 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; - - // Optional. The page token, returned by a previous call, to request the - // next page of results. - string page_token = 3; -} - -// 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; -} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index f820f579..00000000 --- a/renovate.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "extends": [ - ":separateMajorReleases", - ":combinePatchMinorReleases", - ":ignoreUnstable", - ":prImmediately", - ":updateNotScheduled", - ":automergeDisabled", - ":ignoreModulesAndTests", - ":maintainLockFilesDisabled", - ":autodetectPinVersions" - ], - "packageRules": [ - { - "packagePatterns": [ - "^com.google.guava:" - ], - "versionScheme": "docker" - }, - { - "packagePatterns": [ - "^com.google.api:gax", - "^com.google.auth:", - "^com.google.cloud:google-cloud-core", - "^io.grpc:", - "^com.google.guava:" - ], - "groupName": "core dependencies" - }, - { - "packagePatterns": [ - "^com.google.http-client:", - "^com.google.oauth-client:", - "^com.google.api-client:" - ], - "groupName": "core transport dependencies" - }, - { - "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": [ - "^com.google.cloud:google-cloud-" - ], - "ignoreUnstable": false - }, - { - "packagePatterns": [ - "^com.fasterxml.jackson.core" - ], - "groupName": "jackson dependencies" - } - ], - "semanticCommits": true, - "masterIssue": true -} \ No newline at end of file diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml deleted file mode 100644 index 55ea5440..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.0.21 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - com.google.cloud - google-cloud-dataproc - 1.1.0 - - - - com.google.cloud - google-cloud-storage - 1.113.1 - - - - junit - junit - 4.13 - test - - - com.google.truth - truth - 1.0.1 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.2.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 999ba027..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.0.21 - - - - 1.8 - 1.8 - UTF-8 - - - - install-without-bom - snapshot - snippets - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - true - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - - true - - - - - diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml deleted file mode 100644 index ab808975..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.0.21 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-dataproc - 1.1.2-SNAPSHOT - - - - com.google.cloud - google-cloud-storage - 1.113.1 - - - junit - junit - 4.13 - test - - - com.google.truth - truth - 1.0.1 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.2.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 e8619ea2..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.0.21 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - - com.google.cloud - libraries-bom - 11.0.0 - pom - import - - - - - - - com.google.cloud - google-cloud-dataproc - - - - com.google.cloud - google-cloud-storage - - - junit - junit - 4.13 - test - - - com.google.truth - truth - 1.0.1 - test - - - - - diff --git a/samples/snippets/src/main/java/CreateCluster.java b/samples/snippets/src/main/java/CreateCluster.java deleted file mode 100644 index 0815a35f..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-1") - .setNumInstances(1) - .build(); - InstanceGroupConfig workerConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-1") - .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 2a8a6285..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-1") - .setNumInstances(1) - .build(); - InstanceGroupConfig workerConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-1") - .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 0f54c5f8..00000000 --- a/samples/snippets/src/main/java/Quickstart.java +++ /dev/null @@ -1,154 +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.CompletableFuture; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; -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-1") - .setNumInstances(1) - .build(); - InstanceGroupConfig workerConfig = - InstanceGroupConfig.newBuilder() - .setMachineTypeUri("n1-standard-1") - .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 667f3863..00000000 --- a/samples/snippets/src/main/java/SubmitJob.java +++ /dev/null @@ -1,95 +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 539e0e2b..00000000 --- a/samples/snippets/src/test/java/CreateClusterTest.java +++ /dev/null @@ -1,88 +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.BeforeClass; -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 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 188ef7af..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 0cbc2524..00000000 --- a/samples/snippets/src/test/java/QuickstartTest.java +++ /dev/null @@ -1,120 +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.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 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"; - - private ByteArrayOutputStream bout; - 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() { - bout = new ByteArrayOutputStream(); - System.setOut(new PrintStream(bout)); - - 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 = bout.toString(); - - 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 a86161a9..00000000 --- a/synth.metadata +++ /dev/null @@ -1,576 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/java-dataproc.git", - "sha": "a90857415c5ef810e3d6c5084fd89653fab12d8d" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6fd07563a2f1a6785066f5955ad9659a315e4492", - "internalRef": "324941614" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6fd07563a2f1a6785066f5955ad9659a315e4492", - "internalRef": "324941614" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" - } - } - ], - "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/readme/synth.py", - ".github/release-please.yml", - ".github/trusted-contribution.yml", - ".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/linkage-monitor.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/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/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/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/ClusterControllerSmokeTest.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/ClusterControllerSmokeTest.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/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/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/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/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/SharedProto.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/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/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/synth.py b/synth.py deleted file mode 100644 index eb34d451..00000000 --- a/synth.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""This script is used to synthesize generated parts of this library.""" - -import synthtool.languages.java as java - -AUTOSYNTH_MULTIPLE_COMMITS = True -AUTOSYNTH_MULTIPLE_PRS = True - -service = 'dataproc' -versions = ['v1', 'v1beta2'] - -for version in versions: - java.bazel_library( - service=service, - version=version, - bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java', - ) - -java.common_templates() diff --git a/versions.txt b/versions.txt deleted file mode 100644 index 2b75c352..00000000 --- a/versions.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Format: -# module:released-version:current-version - -proto-google-cloud-dataproc-v1beta2:0.89.1:0.89.2-SNAPSHOT -proto-google-cloud-dataproc-v1:1.1.1:1.1.2-SNAPSHOT -grpc-google-cloud-dataproc-v1:1.1.1:1.1.2-SNAPSHOT -grpc-google-cloud-dataproc-v1beta2:0.89.1:0.89.2-SNAPSHOT -google-cloud-dataproc:1.1.1:1.1.2-SNAPSHOT