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

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

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   String name = "name3373707";
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EnvironmentsClient environmentsClient = EnvironmentsClient.create(environmentsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EnvironmentsClient environmentsClient = EnvironmentsClient.create(environmentsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class EnvironmentsClient implements BackgroundResource { + private final EnvironmentsSettings settings; + private final EnvironmentsStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of EnvironmentsClient with default settings. */ + public static final EnvironmentsClient create() throws IOException { + return create(EnvironmentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient create(EnvironmentsSettings settings) throws IOException { + return new EnvironmentsClient(settings); + } + + /** + * Constructs an instance of EnvironmentsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(EnvironmentsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final EnvironmentsClient create(EnvironmentsStub stub) { + return new EnvironmentsClient(stub); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient(EnvironmentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EnvironmentsStubSettings) 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 EnvironmentsClient(EnvironmentsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final EnvironmentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Environment environment = Environment.newBuilder().build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(parent, environment).get();
+   * }
+   * }
+ * + * @param parent The parent must be of the form "projects/{projectId}/locations/{locationId}". + * @param environment The environment to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEnvironmentAsync( + String parent, Environment environment) { + CreateEnvironmentRequest request = + CreateEnvironmentRequest.newBuilder().setParent(parent).setEnvironment(environment).build(); + return createEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEnvironmentAsync( + CreateEnvironmentRequest request) { + return createEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.createEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createEnvironmentOperationCallable() { + return stub.createEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.createEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createEnvironmentCallable() { + return stub.createEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an existing environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name = "name3373707";
+   *   Environment response = environmentsClient.getEnvironment(name);
+   * }
+   * }
+ * + * @param name The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Environment getEnvironment(String name) { + GetEnvironmentRequest request = GetEnvironmentRequest.newBuilder().setName(name).build(); + return getEnvironment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an existing environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   Environment response = environmentsClient.getEnvironment(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 Environment getEnvironment(GetEnvironmentRequest request) { + return getEnvironmentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an existing environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       environmentsClient.getEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEnvironmentCallable() { + return stub.getEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Environment element : environmentsClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEnvironmentsPagedResponse listEnvironments(String parent) { + ListEnvironmentsRequest request = + ListEnvironmentsRequest.newBuilder().setParent(parent).build(); + return listEnvironments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element : environmentsClient.listEnvironments(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 ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request) { + return listEnvironmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.listEnvironmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEnvironmentsPagedCallable() { + return stub.listEnvironmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEnvironmentsResponse response =
+   *         environmentsClient.listEnvironmentsCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEnvironmentsCallable() { + return stub.listEnvironmentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name = "name3373707";
+   *   Environment environment = Environment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Environment response =
+   *       environmentsClient.updateEnvironmentAsync(name, environment, updateMask).get();
+   * }
+   * }
+ * + * @param name The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param environment A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param updateMask Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` + * parameter would include the following two `paths` values: + * "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify + * the scikit-learn version as follows: + *

{ "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } + *

Note that in the above example, any existing PyPI packages other than scikit-learn and + * numpy will be unaffected. + *

Only one update type may be included in a single request's `updateMask`. For example, + * one cannot update both the PyPI packages and labels in the same request. However, it is + * possible to update multiple members of a map field simultaneously in the same request. For + * example, to set the labels "label1" and "label2" while clearing "label3" (assuming it + * already exists), one can provide the paths "labels.label1", "labels.label2", and + * "labels.label3" and populate the patch environment as follows: + *

{ "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } + *

Note that in the above example, any existing labels that are not included in the + * `updateMask` will be unaffected. + *

It is also possible to replace an entire map field by providing the map field's path in + * the `updateMask`. The new value of the field will be that which is provided in the patch + * environment. For example, to delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain the path + * "config.softwareConfig.pypiPackages", and the patch environment would be the following: + *

{ "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } + *

**Note:** Only the following fields can be updated: + *

    + *
  • `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. + * If a replacement package map is not included in `environment`, all custom PyPI + * packages are cleared. It is an error to provide both this mask and a mask specifying + * an individual package. + *
  • `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package + * *packagename*, preserving other packages. To delete the package, include it + * in `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a + * mask of this form and the `config.softwareConfig.pypiPackages` mask. + *
  • `labels` * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to provide both + * this mask and a mask specifying one or more individual labels. + *
  • `labels.`labelName * Set the label named *labelName*, while preserving + * other labels. To delete the label, include it in `updateMask` and omit its mapping in + * `environment.labels`. It is an error to provide both a mask of this form and the + * `labels` mask. + *
  • `config.nodeCount` * Horizontally scale the number of nodes in the environment. + * An integer greater than or equal to 3 must be provided in the `config.nodeCount` + * field. + *
  • `config.webServerNetworkAccessControl` * Replace the environment's current + * `WebServerNetworkAccessControl`. + *
  • `config.databaseConfig` * Replace the environment's current `DatabaseConfig`. + *
  • `config.webServerConfig` * Replace the environment's current `WebServerConfig`. + *
  • `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow + * config overrides. If a replacement config overrides map is not included in + * `environment`, all config overrides are cleared. It is an error to provide both this + * mask and a mask specifying one or more individual config overrides. + *
  • `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache + * Airflow config property *name* in the section named *section*, + * preserving other properties. To delete the property override, include it in + * `updateMask` and omit its mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide + * both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. + *
  • `config.softwareConfig.envVariables` * Replace all environment variables. If a + * replacement environment variable map is not included in `environment`, all custom + * environment variables are cleared. It is an error to provide both this mask and a + * mask specifying one or more individual environment variables. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateEnvironmentAsync( + String name, Environment environment, FieldMask updateMask) { + UpdateEnvironmentRequest request = + UpdateEnvironmentRequest.newBuilder() + .setName(name) + .setEnvironment(environment) + .setUpdateMask(updateMask) + .build(); + return updateEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.updateEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateEnvironmentAsync( + UpdateEnvironmentRequest request) { + return updateEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.updateEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateEnvironmentOperationCallable() { + return stub.updateEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.updateEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateEnvironmentCallable() { + return stub.updateEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name = "name3373707";
+   *   environmentsClient.deleteEnvironmentAsync(name).get();
+   * }
+   * }
+ * + * @param name The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEnvironmentAsync(String name) { + DeleteEnvironmentRequest request = DeleteEnvironmentRequest.newBuilder().setName(name).build(); + return deleteEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   environmentsClient.deleteEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEnvironmentAsync( + DeleteEnvironmentRequest request) { + return deleteEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       environmentsClient.deleteEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteEnvironmentOperationCallable() { + return stub.deleteEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       environmentsClient.deleteEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteEnvironmentCallable() { + return stub.deleteEnvironmentCallable(); + } + + @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 ListEnvironmentsPagedResponse + extends AbstractPagedListResponse< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) { + return new ListEnvironmentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEnvironmentsPagedResponse(ListEnvironmentsPage page) { + super(page, ListEnvironmentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEnvironmentsPage + extends AbstractPage< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment, ListEnvironmentsPage> { + + private ListEnvironmentsPage( + PageContext context, + ListEnvironmentsResponse response) { + super(context, response); + } + + private static ListEnvironmentsPage createEmptyPage() { + return new ListEnvironmentsPage(null, null); + } + + @Override + protected ListEnvironmentsPage createPage( + PageContext context, + ListEnvironmentsResponse response) { + return new ListEnvironmentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEnvironmentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + private ListEnvironmentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEnvironmentsFixedSizeCollection createEmptyCollection() { + return new ListEnvironmentsFixedSizeCollection(null, 0); + } + + @Override + protected ListEnvironmentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEnvironmentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java new file mode 100644 index 00000000..91f101e3 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsSettings.java @@ -0,0 +1,270 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1.stub.EnvironmentsStubSettings; +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 EnvironmentsClient}. + * + *

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

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

{@code
+ * EnvironmentsSettings.Builder environmentsSettingsBuilder = EnvironmentsSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .getEnvironmentSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder
+ *             .getEnvironmentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EnvironmentsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createEnvironment. */ + public UnaryCallSettings createEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).createEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public OperationCallSettings + createEnvironmentOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).createEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to getEnvironment. */ + public UnaryCallSettings getEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).getEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).listEnvironmentsSettings(); + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public UnaryCallSettings updateEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).updateEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public OperationCallSettings + updateEnvironmentOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).updateEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings deleteEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).deleteEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public OperationCallSettings + deleteEnvironmentOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).deleteEnvironmentOperationSettings(); + } + + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) + throws IOException { + return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EnvironmentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EnvironmentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EnvironmentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EnvironmentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EnvironmentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EnvironmentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EnvironmentsStubSettings.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 EnvironmentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EnvironmentsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(EnvironmentsStubSettings.newBuilder(clientContext)); + } + + protected Builder(EnvironmentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EnvironmentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(EnvironmentsStubSettings.newBuilder()); + } + + public EnvironmentsStubSettings.Builder getStubSettingsBuilder() { + return ((EnvironmentsStubSettings.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 createEnvironment. */ + public UnaryCallSettings.Builder + createEnvironmentSettings() { + return getStubSettingsBuilder().createEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public OperationCallSettings.Builder + createEnvironmentOperationSettings() { + return getStubSettingsBuilder().createEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getEnvironment. */ + public UnaryCallSettings.Builder getEnvironmentSettings() { + return getStubSettingsBuilder().getEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return getStubSettingsBuilder().listEnvironmentsSettings(); + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + public UnaryCallSettings.Builder + updateEnvironmentSettings() { + return getStubSettingsBuilder().updateEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + public OperationCallSettings.Builder + updateEnvironmentOperationSettings() { + return getStubSettingsBuilder().updateEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings.Builder + deleteEnvironmentSettings() { + return getStubSettingsBuilder().deleteEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public OperationCallSettings.Builder + deleteEnvironmentOperationSettings() { + return getStubSettingsBuilder().deleteEnvironmentOperationSettings(); + } + + @Override + public EnvironmentsSettings build() throws IOException { + return new EnvironmentsSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java new file mode 100644 index 00000000..21abfb39 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClient.java @@ -0,0 +1,384 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.stub.ImageVersionsStub; +import com.google.cloud.orchestration.airflow.service.v1.stub.ImageVersionsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Readonly service to query available ImageVersions. + * + *

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

{@code
+ * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+ *   String parent = "parent-995424086";
+ *   for (ImageVersion element : imageVersionsClient.listImageVersions(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * ImageVersionsSettings imageVersionsSettings =
+ *     ImageVersionsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageVersionsClient imageVersionsClient = ImageVersionsClient.create(imageVersionsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ImageVersionsSettings imageVersionsSettings =
+ *     ImageVersionsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageVersionsClient imageVersionsClient = ImageVersionsClient.create(imageVersionsSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (ImageVersion element : imageVersionsClient.listImageVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImageVersionsPagedResponse listImageVersions(String parent) { + ListImageVersionsRequest request = + ListImageVersionsRequest.newBuilder().setParent(parent).build(); + return listImageVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List ImageVersions for provided location. + * + *

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   ListImageVersionsRequest request =
+   *       ListImageVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setIncludePastReleases(true)
+   *           .build();
+   *   for (ImageVersion element : imageVersionsClient.listImageVersions(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 ListImageVersionsPagedResponse listImageVersions(ListImageVersionsRequest request) { + return listImageVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List ImageVersions for provided location. + * + *

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   ListImageVersionsRequest request =
+   *       ListImageVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setIncludePastReleases(true)
+   *           .build();
+   *   ApiFuture future =
+   *       imageVersionsClient.listImageVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ImageVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImageVersionsPagedCallable() { + return stub.listImageVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List ImageVersions for provided location. + * + *

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   ListImageVersionsRequest request =
+   *       ListImageVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setIncludePastReleases(true)
+   *           .build();
+   *   while (true) {
+   *     ListImageVersionsResponse response =
+   *         imageVersionsClient.listImageVersionsCallable().call(request);
+   *     for (ImageVersion element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImageVersionsCallable() { + return stub.listImageVersionsCallable(); + } + + @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 ListImageVersionsPagedResponse + extends AbstractPagedListResponse< + ListImageVersionsRequest, + ListImageVersionsResponse, + ImageVersion, + ListImageVersionsPage, + ListImageVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListImageVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListImageVersionsPagedResponse apply(ListImageVersionsPage input) { + return new ListImageVersionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListImageVersionsPagedResponse(ListImageVersionsPage page) { + super(page, ListImageVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListImageVersionsPage + extends AbstractPage< + ListImageVersionsRequest, + ListImageVersionsResponse, + ImageVersion, + ListImageVersionsPage> { + + private ListImageVersionsPage( + PageContext context, + ListImageVersionsResponse response) { + super(context, response); + } + + private static ListImageVersionsPage createEmptyPage() { + return new ListImageVersionsPage(null, null); + } + + @Override + protected ListImageVersionsPage createPage( + PageContext context, + ListImageVersionsResponse response) { + return new ListImageVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListImageVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListImageVersionsRequest, + ListImageVersionsResponse, + ImageVersion, + ListImageVersionsPage, + ListImageVersionsFixedSizeCollection> { + + private ListImageVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListImageVersionsFixedSizeCollection createEmptyCollection() { + return new ListImageVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListImageVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListImageVersionsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java new file mode 100644 index 00000000..b1d7537f --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsSettings.java @@ -0,0 +1,188 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import static com.google.cloud.orchestration.airflow.service.v1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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.orchestration.airflow.service.v1.stub.ImageVersionsStubSettings; +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 ImageVersionsClient}. + * + *

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

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

{@code
+ * ImageVersionsSettings.Builder imageVersionsSettingsBuilder = ImageVersionsSettings.newBuilder();
+ * imageVersionsSettingsBuilder
+ *     .listImageVersionsSettings()
+ *     .setRetrySettings(
+ *         imageVersionsSettingsBuilder
+ *             .listImageVersionsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageVersionsSettings imageVersionsSettings = imageVersionsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ImageVersionsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listImageVersions. */ + public PagedCallSettings< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return ((ImageVersionsStubSettings) getStubSettings()).listImageVersionsSettings(); + } + + public static final ImageVersionsSettings create(ImageVersionsStubSettings stub) + throws IOException { + return new ImageVersionsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageVersionsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageVersionsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageVersionsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageVersionsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageVersionsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageVersionsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageVersionsStubSettings.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 ImageVersionsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageVersionsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageVersionsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageVersionsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageVersionsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageVersionsStubSettings.newBuilder()); + } + + public ImageVersionsStubSettings.Builder getStubSettingsBuilder() { + return ((ImageVersionsStubSettings.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 listImageVersions. */ + public PagedCallSettings.Builder< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return getStubSettingsBuilder().listImageVersionsSettings(); + } + + @Override + public ImageVersionsSettings build() throws IOException { + return new ImageVersionsSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json new file mode 100644 index 00000000..73be7e49 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/gapic_metadata.json @@ -0,0 +1,45 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.orchestration.airflow.service.v1", + "libraryPackage": "com.google.cloud.orchestration.airflow.service.v1", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "CreateEnvironment": { + "methods": ["createEnvironmentAsync", "createEnvironmentAsync", "createEnvironmentOperationCallable", "createEnvironmentCallable"] + }, + "DeleteEnvironment": { + "methods": ["deleteEnvironmentAsync", "deleteEnvironmentAsync", "deleteEnvironmentOperationCallable", "deleteEnvironmentCallable"] + }, + "GetEnvironment": { + "methods": ["getEnvironment", "getEnvironment", "getEnvironmentCallable"] + }, + "ListEnvironments": { + "methods": ["listEnvironments", "listEnvironments", "listEnvironmentsPagedCallable", "listEnvironmentsCallable"] + }, + "UpdateEnvironment": { + "methods": ["updateEnvironmentAsync", "updateEnvironmentAsync", "updateEnvironmentOperationCallable", "updateEnvironmentCallable"] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": ["listImageVersions", "listImageVersions", "listImageVersionsPagedCallable", "listImageVersionsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java new file mode 100644 index 00000000..06105953 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= EnvironmentsClient ======================= + * + *

Service Description: Managed Apache Airflow Environments. + * + *

Sample for EnvironmentsClient: + * + *

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   String name = "name3373707";
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * + *

======================= ImageVersionsClient ======================= + * + *

Service Description: Readonly service to query available ImageVersions. + * + *

Sample for ImageVersionsClient: + * + *

{@code
+ * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+ *   String parent = "parent-995424086";
+ *   for (ImageVersion element : imageVersionsClient.listImageVersions(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.orchestration.airflow.service.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java new file mode 100644 index 00000000..4f1a5171 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStub.java @@ -0,0 +1,96 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.Environment; +import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; +import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Environments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class EnvironmentsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createEnvironmentOperationCallable()"); + } + + public UnaryCallable createEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: createEnvironmentCallable()"); + } + + public UnaryCallable getEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: getEnvironmentCallable()"); + } + + public UnaryCallable + listEnvironmentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsPagedCallable()"); + } + + public UnaryCallable + listEnvironmentsCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsCallable()"); + } + + public OperationCallable + updateEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateEnvironmentOperationCallable()"); + } + + public UnaryCallable updateEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: updateEnvironmentCallable()"); + } + + public OperationCallable + deleteEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteEnvironmentOperationCallable()"); + } + + public UnaryCallable deleteEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEnvironmentCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java new file mode 100644 index 00000000..bfe654b2 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/EnvironmentsStubSettings.java @@ -0,0 +1,587 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.Environment; +import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; +import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; +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 EnvironmentsStub}. + * + *

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

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

{@code
+ * EnvironmentsStubSettings.Builder environmentsSettingsBuilder =
+ *     EnvironmentsStubSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .getEnvironmentSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder
+ *             .getEnvironmentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsStubSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class EnvironmentsStubSettings 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 createEnvironmentSettings; + private final OperationCallSettings + createEnvironmentOperationSettings; + private final UnaryCallSettings getEnvironmentSettings; + private final PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + private final UnaryCallSettings updateEnvironmentSettings; + private final OperationCallSettings + updateEnvironmentOperationSettings; + private final UnaryCallSettings deleteEnvironmentSettings; + private final OperationCallSettings + deleteEnvironmentOperationSettings; + + private static final PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> + LIST_ENVIRONMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEnvironmentsRequest injectToken( + ListEnvironmentsRequest payload, String token) { + return ListEnvironmentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEnvironmentsRequest injectPageSize( + ListEnvironmentsRequest payload, int pageSize) { + return ListEnvironmentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEnvironmentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEnvironmentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEnvironmentsResponse payload) { + return payload.getEnvironmentsList() == null + ? ImmutableList.of() + : payload.getEnvironmentsList(); + } + }; + + private static final PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + LIST_ENVIRONMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEnvironmentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ENVIRONMENTS_PAGE_STR_DESC, request, context); + return ListEnvironmentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createEnvironment. */ + public UnaryCallSettings createEnvironmentSettings() { + return createEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public OperationCallSettings + createEnvironmentOperationSettings() { + return createEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to getEnvironment. */ + public UnaryCallSettings getEnvironmentSettings() { + return getEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public UnaryCallSettings updateEnvironmentSettings() { + return updateEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public OperationCallSettings + updateEnvironmentOperationSettings() { + return updateEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings deleteEnvironmentSettings() { + return deleteEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public OperationCallSettings + deleteEnvironmentOperationSettings() { + return deleteEnvironmentOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEnvironmentsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "composer.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "composer.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EnvironmentsStubSettings.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 EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createEnvironmentSettings = settingsBuilder.createEnvironmentSettings().build(); + createEnvironmentOperationSettings = + settingsBuilder.createEnvironmentOperationSettings().build(); + getEnvironmentSettings = settingsBuilder.getEnvironmentSettings().build(); + listEnvironmentsSettings = settingsBuilder.listEnvironmentsSettings().build(); + updateEnvironmentSettings = settingsBuilder.updateEnvironmentSettings().build(); + updateEnvironmentOperationSettings = + settingsBuilder.updateEnvironmentOperationSettings().build(); + deleteEnvironmentSettings = settingsBuilder.deleteEnvironmentSettings().build(); + deleteEnvironmentOperationSettings = + settingsBuilder.deleteEnvironmentOperationSettings().build(); + } + + /** Builder for EnvironmentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createEnvironmentSettings; + private final OperationCallSettings.Builder< + CreateEnvironmentRequest, Environment, OperationMetadata> + createEnvironmentOperationSettings; + private final UnaryCallSettings.Builder + getEnvironmentSettings; + private final PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + private final UnaryCallSettings.Builder + updateEnvironmentSettings; + private final OperationCallSettings.Builder< + UpdateEnvironmentRequest, Environment, OperationMetadata> + updateEnvironmentOperationSettings; + private final UnaryCallSettings.Builder + deleteEnvironmentSettings; + private final OperationCallSettings.Builder + deleteEnvironmentOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + getEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEnvironmentsSettings = PagedCallSettings.newBuilder(LIST_ENVIRONMENTS_PAGE_STR_FACT); + updateEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + deleteEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEnvironmentSettings, + getEnvironmentSettings, + listEnvironmentsSettings, + updateEnvironmentSettings, + deleteEnvironmentSettings); + initDefaults(this); + } + + protected Builder(EnvironmentsStubSettings settings) { + super(settings); + + createEnvironmentSettings = settings.createEnvironmentSettings.toBuilder(); + createEnvironmentOperationSettings = settings.createEnvironmentOperationSettings.toBuilder(); + getEnvironmentSettings = settings.getEnvironmentSettings.toBuilder(); + listEnvironmentsSettings = settings.listEnvironmentsSettings.toBuilder(); + updateEnvironmentSettings = settings.updateEnvironmentSettings.toBuilder(); + updateEnvironmentOperationSettings = settings.updateEnvironmentOperationSettings.toBuilder(); + deleteEnvironmentSettings = settings.deleteEnvironmentSettings.toBuilder(); + deleteEnvironmentOperationSettings = settings.deleteEnvironmentOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEnvironmentSettings, + getEnvironmentSettings, + listEnvironmentsSettings, + updateEnvironmentSettings, + deleteEnvironmentSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listEnvironmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Environment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Environment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public UnaryCallSettings.Builder + createEnvironmentSettings() { + return createEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createEnvironmentOperationSettings() { + return createEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to getEnvironment. */ + public UnaryCallSettings.Builder getEnvironmentSettings() { + return getEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + public UnaryCallSettings.Builder + updateEnvironmentSettings() { + return updateEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateEnvironmentOperationSettings() { + return updateEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings.Builder + deleteEnvironmentSettings() { + return deleteEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteEnvironmentOperationSettings() { + return deleteEnvironmentOperationSettings; + } + + @Override + public EnvironmentsStubSettings build() throws IOException { + return new EnvironmentsStubSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java new file mode 100644 index 00000000..81af54bd --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Environments service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcEnvironmentsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java new file mode 100644 index 00000000..6578f822 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcEnvironmentsStub.java @@ -0,0 +1,366 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.Environment; +import com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; +import com.google.cloud.orchestration.airflow.service.v1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Environments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcEnvironmentsStub extends EnvironmentsStub { + private static final MethodDescriptor + createEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/CreateEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/GetEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Environment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEnvironmentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/ListEnvironments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEnvironmentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/UpdateEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.Environments/DeleteEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createEnvironmentCallable; + private final OperationCallable + createEnvironmentOperationCallable; + private final UnaryCallable getEnvironmentCallable; + private final UnaryCallable + listEnvironmentsCallable; + private final UnaryCallable + listEnvironmentsPagedCallable; + private final UnaryCallable updateEnvironmentCallable; + private final OperationCallable + updateEnvironmentOperationCallable; + private final UnaryCallable deleteEnvironmentCallable; + private final OperationCallable + deleteEnvironmentOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEnvironmentsStub create(EnvironmentsStubSettings settings) + throws IOException { + return new GrpcEnvironmentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEnvironmentsStub create(ClientContext clientContext) throws IOException { + return new GrpcEnvironmentsStub(EnvironmentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEnvironmentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEnvironmentsStub( + EnvironmentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub(EnvironmentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEnvironmentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub( + EnvironmentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listEnvironmentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEnvironmentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEnvironmentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.createEnvironmentCallable = + callableFactory.createUnaryCallable( + createEnvironmentTransportSettings, + settings.createEnvironmentSettings(), + clientContext); + this.createEnvironmentOperationCallable = + callableFactory.createOperationCallable( + createEnvironmentTransportSettings, + settings.createEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.getEnvironmentCallable = + callableFactory.createUnaryCallable( + getEnvironmentTransportSettings, settings.getEnvironmentSettings(), clientContext); + this.listEnvironmentsCallable = + callableFactory.createUnaryCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.listEnvironmentsPagedCallable = + callableFactory.createPagedCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.updateEnvironmentCallable = + callableFactory.createUnaryCallable( + updateEnvironmentTransportSettings, + settings.updateEnvironmentSettings(), + clientContext); + this.updateEnvironmentOperationCallable = + callableFactory.createOperationCallable( + updateEnvironmentTransportSettings, + settings.updateEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.deleteEnvironmentCallable = + callableFactory.createUnaryCallable( + deleteEnvironmentTransportSettings, + settings.deleteEnvironmentSettings(), + clientContext); + this.deleteEnvironmentOperationCallable = + callableFactory.createOperationCallable( + deleteEnvironmentTransportSettings, + settings.deleteEnvironmentOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createEnvironmentCallable() { + return createEnvironmentCallable; + } + + @Override + public OperationCallable + createEnvironmentOperationCallable() { + return createEnvironmentOperationCallable; + } + + @Override + public UnaryCallable getEnvironmentCallable() { + return getEnvironmentCallable; + } + + @Override + public UnaryCallable + listEnvironmentsCallable() { + return listEnvironmentsCallable; + } + + @Override + public UnaryCallable + listEnvironmentsPagedCallable() { + return listEnvironmentsPagedCallable; + } + + @Override + public UnaryCallable updateEnvironmentCallable() { + return updateEnvironmentCallable; + } + + @Override + public OperationCallable + updateEnvironmentOperationCallable() { + return updateEnvironmentOperationCallable; + } + + @Override + public UnaryCallable deleteEnvironmentCallable() { + return deleteEnvironmentCallable; + } + + @Override + public OperationCallable + deleteEnvironmentOperationCallable() { + return deleteEnvironmentOperationCallable; + } + + @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-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java new file mode 100644 index 00000000..cb37f02d --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageVersions service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcImageVersionsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java new file mode 100644 index 00000000..f62fe79d --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/GrpcImageVersionsStub.java @@ -0,0 +1,181 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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.orchestration.airflow.service.v1.ListImageVersionsRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageVersions service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcImageVersionsStub extends ImageVersionsStub { + private static final MethodDescriptor + listImageVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1.ImageVersions/ListImageVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListImageVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListImageVersionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listImageVersionsCallable; + private final UnaryCallable + listImageVersionsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageVersionsStub create(ImageVersionsStubSettings settings) + throws IOException { + return new GrpcImageVersionsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageVersionsStub create(ClientContext clientContext) throws IOException { + return new GrpcImageVersionsStub(ImageVersionsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageVersionsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageVersionsStub( + ImageVersionsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageVersionsStub, 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 GrpcImageVersionsStub(ImageVersionsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageVersionsCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageVersionsStub, 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 GrpcImageVersionsStub( + ImageVersionsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listImageVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listImageVersionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListImageVersionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listImageVersionsCallable = + callableFactory.createUnaryCallable( + listImageVersionsTransportSettings, + settings.listImageVersionsSettings(), + clientContext); + this.listImageVersionsPagedCallable = + callableFactory.createPagedCallable( + listImageVersionsTransportSettings, + settings.listImageVersionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listImageVersionsCallable() { + return listImageVersionsCallable; + } + + @Override + public UnaryCallable + listImageVersionsPagedCallable() { + return listImageVersionsPagedCallable; + } + + @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-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/ImageVersionsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/ImageVersionsStub.java new file mode 100644 index 00000000..edc1b4bd --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/ImageVersionsStub.java @@ -0,0 +1,48 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1.ImageVersionsClient.ListImageVersionsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageVersions service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ImageVersionsStub implements BackgroundResource { + + public UnaryCallable + listImageVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listImageVersionsPagedCallable()"); + } + + public UnaryCallable + listImageVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listImageVersionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/ImageVersionsStubSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/ImageVersionsStubSettings.java new file mode 100644 index 00000000..c09f5341 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1/stub/ImageVersionsStubSettings.java @@ -0,0 +1,340 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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.orchestration.airflow.service.v1.ImageVersion; +import com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; +import com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; +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 java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageVersionsStub}. + * + *

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

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

{@code
+ * ImageVersionsStubSettings.Builder imageVersionsSettingsBuilder =
+ *     ImageVersionsStubSettings.newBuilder();
+ * imageVersionsSettingsBuilder
+ *     .listImageVersionsSettings()
+ *     .setRetrySettings(
+ *         imageVersionsSettingsBuilder
+ *             .listImageVersionsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageVersionsStubSettings imageVersionsSettings = imageVersionsSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ImageVersionsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings; + + private static final PagedListDescriptor< + ListImageVersionsRequest, ListImageVersionsResponse, ImageVersion> + LIST_IMAGE_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListImageVersionsRequest, ListImageVersionsResponse, ImageVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListImageVersionsRequest injectToken( + ListImageVersionsRequest payload, String token) { + return ListImageVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListImageVersionsRequest injectPageSize( + ListImageVersionsRequest payload, int pageSize) { + return ListImageVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListImageVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListImageVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListImageVersionsResponse payload) { + return payload.getImageVersionsList() == null + ? ImmutableList.of() + : payload.getImageVersionsList(); + } + }; + + private static final PagedListResponseFactory< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + LIST_IMAGE_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListImageVersionsRequest, + ListImageVersionsResponse, + ListImageVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListImageVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_IMAGE_VERSIONS_PAGE_STR_DESC, request, context); + return ListImageVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listImageVersions. */ + public PagedCallSettings< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return listImageVersionsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ImageVersionsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageVersionsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "composer.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "composer.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageVersionsStubSettings.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 ImageVersionsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listImageVersionsSettings = settingsBuilder.listImageVersionsSettings().build(); + } + + /** Builder for ImageVersionsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listImageVersionsSettings = PagedCallSettings.newBuilder(LIST_IMAGE_VERSIONS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listImageVersionsSettings); + initDefaults(this); + } + + protected Builder(ImageVersionsStubSettings settings) { + super(settings); + + listImageVersionsSettings = settings.listImageVersionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listImageVersionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listImageVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listImageVersions. */ + public PagedCallSettings.Builder< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return listImageVersionsSettings; + } + + @Override + public ImageVersionsStubSettings build() throws IOException { + return new ImageVersionsStubSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java new file mode 100644 index 00000000..440c78f4 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClient.java @@ -0,0 +1,977 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.orchestration.airflow.service.v1beta1.stub.EnvironmentsStub; +import com.google.cloud.orchestration.airflow.service.v1beta1.stub.EnvironmentsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Managed Apache Airflow Environments. + * + *

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

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   String name = "name3373707";
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * EnvironmentsClient environmentsClient = EnvironmentsClient.create(environmentsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * EnvironmentsSettings environmentsSettings =
+ *     EnvironmentsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * EnvironmentsClient environmentsClient = EnvironmentsClient.create(environmentsSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class EnvironmentsClient implements BackgroundResource { + private final EnvironmentsSettings settings; + private final EnvironmentsStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of EnvironmentsClient with default settings. */ + public static final EnvironmentsClient create() throws IOException { + return create(EnvironmentsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient create(EnvironmentsSettings settings) throws IOException { + return new EnvironmentsClient(settings); + } + + /** + * Constructs an instance of EnvironmentsClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(EnvironmentsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final EnvironmentsClient create(EnvironmentsStub stub) { + return new EnvironmentsClient(stub); + } + + /** + * Constructs an instance of EnvironmentsClient, 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 EnvironmentsClient(EnvironmentsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((EnvironmentsStubSettings) 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 EnvironmentsClient(EnvironmentsStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final EnvironmentsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   Environment environment = Environment.newBuilder().build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(parent, environment).get();
+   * }
+   * }
+ * + * @param parent The parent must be of the form "projects/{projectId}/locations/{locationId}". + * @param environment The environment to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEnvironmentAsync( + String parent, Environment environment) { + CreateEnvironmentRequest request = + CreateEnvironmentRequest.newBuilder().setParent(parent).setEnvironment(environment).build(); + return createEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.createEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createEnvironmentAsync( + CreateEnvironmentRequest request) { + return createEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.createEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createEnvironmentOperationCallable() { + return stub.createEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a new environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CreateEnvironmentRequest request =
+   *       CreateEnvironmentRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.createEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createEnvironmentCallable() { + return stub.createEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an existing environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name = "name3373707";
+   *   Environment response = environmentsClient.getEnvironment(name);
+   * }
+   * }
+ * + * @param name The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Environment getEnvironment(String name) { + GetEnvironmentRequest request = GetEnvironmentRequest.newBuilder().setName(name).build(); + return getEnvironment(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an existing environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   Environment response = environmentsClient.getEnvironment(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 Environment getEnvironment(GetEnvironmentRequest request) { + return getEnvironmentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get an existing environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   GetEnvironmentRequest request =
+   *       GetEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       environmentsClient.getEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getEnvironmentCallable() { + return stub.getEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (Environment element : environmentsClient.listEnvironments(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListEnvironmentsPagedResponse listEnvironments(String parent) { + ListEnvironmentsRequest request = + ListEnvironmentsRequest.newBuilder().setParent(parent).build(); + return listEnvironments(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Environment element : environmentsClient.listEnvironments(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 ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request) { + return listEnvironmentsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.listEnvironmentsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Environment element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEnvironmentsPagedCallable() { + return stub.listEnvironmentsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List environments. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   ListEnvironmentsRequest request =
+   *       ListEnvironmentsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListEnvironmentsResponse response =
+   *         environmentsClient.listEnvironmentsCallable().call(request);
+   *     for (Environment element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listEnvironmentsCallable() { + return stub.listEnvironmentsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name = "name3373707";
+   *   Environment environment = Environment.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Environment response =
+   *       environmentsClient.updateEnvironmentAsync(name, environment, updateMask).get();
+   * }
+   * }
+ * + * @param name The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param environment A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param updateMask Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of argparse, the `updateMask` + * parameter would include the following two `paths` values: + * "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.argparse". The included patch environment would specify + * the scikit-learn version as follows: + *

{ "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } + *

Note that in the above example, any existing PyPI packages other than scikit-learn and + * argparse will be unaffected. + *

Only one update type may be included in a single request's `updateMask`. For example, + * one cannot update both the PyPI packages and labels in the same request. However, it is + * possible to update multiple members of a map field simultaneously in the same request. For + * example, to set the labels "label1" and "label2" while clearing "label3" (assuming it + * already exists), one can provide the paths "labels.label1", "labels.label2", and + * "labels.label3" and populate the patch environment as follows: + *

{ "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } + *

Note that in the above example, any existing labels that are not included in the + * `updateMask` will be unaffected. + *

It is also possible to replace an entire map field by providing the map field's path in + * the `updateMask`. The new value of the field will be that which is provided in the patch + * environment. For example, to delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain the path + * "config.softwareConfig.pypiPackages", and the patch environment would be the following: + *

{ "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } + *

**Note:** Only the following fields can be updated: + *

    + *
  • `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. + * If a replacement package map is not included in `environment`, all custom PyPI + * packages are cleared. It is an error to provide both this mask and a mask specifying + * an individual package. + *
  • `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package + * *packagename*, preserving other packages. To delete the package, include it + * in `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a + * mask of this form and the `config.softwareConfig.pypiPackages` mask. + *
  • `labels` * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to provide both + * this mask and a mask specifying one or more individual labels. + *
  • `labels.`labelName * Set the label named *labelName*, while preserving + * other labels. To delete the label, include it in `updateMask` and omit its mapping in + * `environment.labels`. It is an error to provide both a mask of this form and the + * `labels` mask. + *
  • `config.nodeCount` * Horizontally scale the number of nodes in the environment. + * An integer greater than or equal to 3 must be provided in the `config.nodeCount` + * field. * `config.webServerNetworkAccessControl` * Replace the environment's + * current WebServerNetworkAccessControl. + *
  • `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow + * config overrides. If a replacement config overrides map is not included in + * `environment`, all config overrides are cleared. It is an error to provide both this + * mask and a mask specifying one or more individual config overrides. + *
  • `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache + * Airflow config property *name* in the section named *section*, + * preserving other properties. To delete the property override, include it in + * `updateMask` and omit its mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide + * both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. + *
  • `config.softwareConfig.envVariables` * Replace all environment variables. If a + * replacement environment variable map is not included in `environment`, all custom + * environment variables are cleared. It is an error to provide both this mask and a + * mask specifying one or more individual environment variables. + *
  • `config.softwareConfig.imageVersion` * Upgrade the version of the environment + * in-place. Refer to `SoftwareConfig.image_version` for information on how to format + * the new image version. Additionally, the new image version cannot effect a version + * downgrade and must match the current image version's Composer major version and + * Airflow major and minor versions. Consult the [Cloud Composer Version + * List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + * for valid values. + *
  • `config.softwareConfig.schedulerCount` * Horizontally scale the number of + * schedulers in Airflow. A positive integer not greater than the number of nodes must + * be provided in the `config.softwareConfig.schedulerCount` field. * + * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow + * database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + * or db-n1-standard-16. * `config.webServerConfig.machineType` * Machine type + * on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, + * composer-n1-webserver-4 or composer-n1-webserver-8. * `config.maintenanceWindow` + * * Maintenance window during which Cloud Composer components may be under + * maintenance. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateEnvironmentAsync( + String name, Environment environment, FieldMask updateMask) { + UpdateEnvironmentRequest request = + UpdateEnvironmentRequest.newBuilder() + .setName(name) + .setEnvironment(environment) + .setUpdateMask(updateMask) + .build(); + return updateEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Environment response = environmentsClient.updateEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateEnvironmentAsync( + UpdateEnvironmentRequest request) { + return updateEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.updateEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateEnvironmentOperationCallable() { + return stub.updateEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   UpdateEnvironmentRequest request =
+   *       UpdateEnvironmentRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setEnvironment(Environment.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       environmentsClient.updateEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateEnvironmentCallable() { + return stub.updateEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   String name = "name3373707";
+   *   environmentsClient.deleteEnvironmentAsync(name).get();
+   * }
+   * }
+ * + * @param name The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEnvironmentAsync(String name) { + DeleteEnvironmentRequest request = DeleteEnvironmentRequest.newBuilder().setName(name).build(); + return deleteEnvironmentAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   environmentsClient.deleteEnvironmentAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteEnvironmentAsync( + DeleteEnvironmentRequest request) { + return deleteEnvironmentOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       environmentsClient.deleteEnvironmentOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteEnvironmentOperationCallable() { + return stub.deleteEnvironmentOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete an environment. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   DeleteEnvironmentRequest request =
+   *       DeleteEnvironmentRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       environmentsClient.deleteEnvironmentCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteEnvironmentCallable() { + return stub.deleteEnvironmentCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart Airflow web server. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   RestartWebServerRequest request =
+   *       RestartWebServerRequest.newBuilder().setName("name3373707").build();
+   *   Environment response = environmentsClient.restartWebServerAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture restartWebServerAsync( + RestartWebServerRequest request) { + return restartWebServerOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart Airflow web server. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   RestartWebServerRequest request =
+   *       RestartWebServerRequest.newBuilder().setName("name3373707").build();
+   *   OperationFuture future =
+   *       environmentsClient.restartWebServerOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Environment response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + restartWebServerOperationCallable() { + return stub.restartWebServerOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restart Airflow web server. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   RestartWebServerRequest request =
+   *       RestartWebServerRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       environmentsClient.restartWebServerCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable restartWebServerCallable() { + return stub.restartWebServerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if an upgrade operation on the environment will succeed. + * + *

In case of problems detailed info can be found in the returned Operation. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CheckUpgradeRequest request =
+   *       CheckUpgradeRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setImageVersion("imageVersion949870333")
+   *           .build();
+   *   CheckUpgradeResponse response = environmentsClient.checkUpgradeAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture checkUpgradeAsync( + CheckUpgradeRequest request) { + return checkUpgradeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if an upgrade operation on the environment will succeed. + * + *

In case of problems detailed info can be found in the returned Operation. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CheckUpgradeRequest request =
+   *       CheckUpgradeRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setImageVersion("imageVersion949870333")
+   *           .build();
+   *   OperationFuture future =
+   *       environmentsClient.checkUpgradeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CheckUpgradeResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + checkUpgradeOperationCallable() { + return stub.checkUpgradeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Check if an upgrade operation on the environment will succeed. + * + *

In case of problems detailed info can be found in the returned Operation. + * + *

Sample code: + * + *

{@code
+   * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+   *   CheckUpgradeRequest request =
+   *       CheckUpgradeRequest.newBuilder()
+   *           .setEnvironment("environment-85904877")
+   *           .setImageVersion("imageVersion949870333")
+   *           .build();
+   *   ApiFuture future = environmentsClient.checkUpgradeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable checkUpgradeCallable() { + return stub.checkUpgradeCallable(); + } + + @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 ListEnvironmentsPagedResponse + extends AbstractPagedListResponse< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEnvironmentsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEnvironmentsPagedResponse apply(ListEnvironmentsPage input) { + return new ListEnvironmentsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEnvironmentsPagedResponse(ListEnvironmentsPage page) { + super(page, ListEnvironmentsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEnvironmentsPage + extends AbstractPage< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment, ListEnvironmentsPage> { + + private ListEnvironmentsPage( + PageContext context, + ListEnvironmentsResponse response) { + super(context, response); + } + + private static ListEnvironmentsPage createEmptyPage() { + return new ListEnvironmentsPage(null, null); + } + + @Override + protected ListEnvironmentsPage createPage( + PageContext context, + ListEnvironmentsResponse response) { + return new ListEnvironmentsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEnvironmentsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEnvironmentsRequest, + ListEnvironmentsResponse, + Environment, + ListEnvironmentsPage, + ListEnvironmentsFixedSizeCollection> { + + private ListEnvironmentsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEnvironmentsFixedSizeCollection createEmptyCollection() { + return new ListEnvironmentsFixedSizeCollection(null, 0); + } + + @Override + protected ListEnvironmentsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEnvironmentsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java new file mode 100644 index 00000000..092d7ecb --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsSettings.java @@ -0,0 +1,317 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1beta1.stub.EnvironmentsStubSettings; +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 EnvironmentsClient}. + * + *

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

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

{@code
+ * EnvironmentsSettings.Builder environmentsSettingsBuilder = EnvironmentsSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .getEnvironmentSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder
+ *             .getEnvironmentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class EnvironmentsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createEnvironment. */ + public UnaryCallSettings createEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).createEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public OperationCallSettings + createEnvironmentOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).createEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to getEnvironment. */ + public UnaryCallSettings getEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).getEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).listEnvironmentsSettings(); + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public UnaryCallSettings updateEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).updateEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public OperationCallSettings + updateEnvironmentOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).updateEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings deleteEnvironmentSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).deleteEnvironmentSettings(); + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public OperationCallSettings + deleteEnvironmentOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).deleteEnvironmentOperationSettings(); + } + + /** Returns the object with the settings used for calls to restartWebServer. */ + public UnaryCallSettings restartWebServerSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).restartWebServerSettings(); + } + + /** Returns the object with the settings used for calls to restartWebServer. */ + public OperationCallSettings + restartWebServerOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).restartWebServerOperationSettings(); + } + + /** Returns the object with the settings used for calls to checkUpgrade. */ + public UnaryCallSettings checkUpgradeSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).checkUpgradeSettings(); + } + + /** Returns the object with the settings used for calls to checkUpgrade. */ + public OperationCallSettings + checkUpgradeOperationSettings() { + return ((EnvironmentsStubSettings) getStubSettings()).checkUpgradeOperationSettings(); + } + + public static final EnvironmentsSettings create(EnvironmentsStubSettings stub) + throws IOException { + return new EnvironmentsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return EnvironmentsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return EnvironmentsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return EnvironmentsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return EnvironmentsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return EnvironmentsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return EnvironmentsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return EnvironmentsStubSettings.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 EnvironmentsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for EnvironmentsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(EnvironmentsStubSettings.newBuilder(clientContext)); + } + + protected Builder(EnvironmentsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(EnvironmentsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(EnvironmentsStubSettings.newBuilder()); + } + + public EnvironmentsStubSettings.Builder getStubSettingsBuilder() { + return ((EnvironmentsStubSettings.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 createEnvironment. */ + public UnaryCallSettings.Builder + createEnvironmentSettings() { + return getStubSettingsBuilder().createEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public OperationCallSettings.Builder + createEnvironmentOperationSettings() { + return getStubSettingsBuilder().createEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getEnvironment. */ + public UnaryCallSettings.Builder getEnvironmentSettings() { + return getStubSettingsBuilder().getEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return getStubSettingsBuilder().listEnvironmentsSettings(); + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + public UnaryCallSettings.Builder + updateEnvironmentSettings() { + return getStubSettingsBuilder().updateEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + public OperationCallSettings.Builder + updateEnvironmentOperationSettings() { + return getStubSettingsBuilder().updateEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings.Builder + deleteEnvironmentSettings() { + return getStubSettingsBuilder().deleteEnvironmentSettings(); + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public OperationCallSettings.Builder + deleteEnvironmentOperationSettings() { + return getStubSettingsBuilder().deleteEnvironmentOperationSettings(); + } + + /** Returns the builder for the settings used for calls to restartWebServer. */ + public UnaryCallSettings.Builder + restartWebServerSettings() { + return getStubSettingsBuilder().restartWebServerSettings(); + } + + /** Returns the builder for the settings used for calls to restartWebServer. */ + public OperationCallSettings.Builder + restartWebServerOperationSettings() { + return getStubSettingsBuilder().restartWebServerOperationSettings(); + } + + /** Returns the builder for the settings used for calls to checkUpgrade. */ + public UnaryCallSettings.Builder checkUpgradeSettings() { + return getStubSettingsBuilder().checkUpgradeSettings(); + } + + /** Returns the builder for the settings used for calls to checkUpgrade. */ + public OperationCallSettings.Builder< + CheckUpgradeRequest, CheckUpgradeResponse, OperationMetadata> + checkUpgradeOperationSettings() { + return getStubSettingsBuilder().checkUpgradeOperationSettings(); + } + + @Override + public EnvironmentsSettings build() throws IOException { + return new EnvironmentsSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsClient.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsClient.java new file mode 100644 index 00000000..875885ea --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsClient.java @@ -0,0 +1,385 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.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.orchestration.airflow.service.v1beta1.stub.ImageVersionsStub; +import com.google.cloud.orchestration.airflow.service.v1beta1.stub.ImageVersionsStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Readonly service to query available ImageVersions. + * + *

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

{@code
+ * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+ *   String parent = "parent-995424086";
+ *   for (ImageVersion element : imageVersionsClient.listImageVersions(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * ImageVersionsSettings imageVersionsSettings =
+ *     ImageVersionsSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ImageVersionsClient imageVersionsClient = ImageVersionsClient.create(imageVersionsSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ImageVersionsSettings imageVersionsSettings =
+ *     ImageVersionsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ImageVersionsClient imageVersionsClient = ImageVersionsClient.create(imageVersionsSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (ImageVersion element : imageVersionsClient.listImageVersions(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListImageVersionsPagedResponse listImageVersions(String parent) { + ListImageVersionsRequest request = + ListImageVersionsRequest.newBuilder().setParent(parent).build(); + return listImageVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List ImageVersions for provided location. + * + *

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   ListImageVersionsRequest request =
+   *       ListImageVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setIncludePastReleases(true)
+   *           .build();
+   *   for (ImageVersion element : imageVersionsClient.listImageVersions(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 ListImageVersionsPagedResponse listImageVersions(ListImageVersionsRequest request) { + return listImageVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List ImageVersions for provided location. + * + *

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   ListImageVersionsRequest request =
+   *       ListImageVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setIncludePastReleases(true)
+   *           .build();
+   *   ApiFuture future =
+   *       imageVersionsClient.listImageVersionsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ImageVersion element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImageVersionsPagedCallable() { + return stub.listImageVersionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List ImageVersions for provided location. + * + *

Sample code: + * + *

{@code
+   * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+   *   ListImageVersionsRequest request =
+   *       ListImageVersionsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setIncludePastReleases(true)
+   *           .build();
+   *   while (true) {
+   *     ListImageVersionsResponse response =
+   *         imageVersionsClient.listImageVersionsCallable().call(request);
+   *     for (ImageVersion element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listImageVersionsCallable() { + return stub.listImageVersionsCallable(); + } + + @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 ListImageVersionsPagedResponse + extends AbstractPagedListResponse< + ListImageVersionsRequest, + ListImageVersionsResponse, + ImageVersion, + ListImageVersionsPage, + ListImageVersionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListImageVersionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListImageVersionsPagedResponse apply(ListImageVersionsPage input) { + return new ListImageVersionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListImageVersionsPagedResponse(ListImageVersionsPage page) { + super(page, ListImageVersionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListImageVersionsPage + extends AbstractPage< + ListImageVersionsRequest, + ListImageVersionsResponse, + ImageVersion, + ListImageVersionsPage> { + + private ListImageVersionsPage( + PageContext context, + ListImageVersionsResponse response) { + super(context, response); + } + + private static ListImageVersionsPage createEmptyPage() { + return new ListImageVersionsPage(null, null); + } + + @Override + protected ListImageVersionsPage createPage( + PageContext context, + ListImageVersionsResponse response) { + return new ListImageVersionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListImageVersionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListImageVersionsRequest, + ListImageVersionsResponse, + ImageVersion, + ListImageVersionsPage, + ListImageVersionsFixedSizeCollection> { + + private ListImageVersionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListImageVersionsFixedSizeCollection createEmptyCollection() { + return new ListImageVersionsFixedSizeCollection(null, 0); + } + + @Override + protected ListImageVersionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListImageVersionsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsSettings.java new file mode 100644 index 00000000..f12e16c4 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsSettings.java @@ -0,0 +1,189 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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.orchestration.airflow.service.v1beta1.stub.ImageVersionsStubSettings; +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 ImageVersionsClient}. + * + *

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

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

{@code
+ * ImageVersionsSettings.Builder imageVersionsSettingsBuilder = ImageVersionsSettings.newBuilder();
+ * imageVersionsSettingsBuilder
+ *     .listImageVersionsSettings()
+ *     .setRetrySettings(
+ *         imageVersionsSettingsBuilder
+ *             .listImageVersionsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageVersionsSettings imageVersionsSettings = imageVersionsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageVersionsSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listImageVersions. */ + public PagedCallSettings< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return ((ImageVersionsStubSettings) getStubSettings()).listImageVersionsSettings(); + } + + public static final ImageVersionsSettings create(ImageVersionsStubSettings stub) + throws IOException { + return new ImageVersionsSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ImageVersionsStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ImageVersionsStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ImageVersionsStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ImageVersionsStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ImageVersionsStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ImageVersionsStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ImageVersionsStubSettings.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 ImageVersionsSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ImageVersionsSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ImageVersionsStubSettings.newBuilder(clientContext)); + } + + protected Builder(ImageVersionsSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ImageVersionsStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ImageVersionsStubSettings.newBuilder()); + } + + public ImageVersionsStubSettings.Builder getStubSettingsBuilder() { + return ((ImageVersionsStubSettings.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 listImageVersions. */ + public PagedCallSettings.Builder< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return getStubSettingsBuilder().listImageVersionsSettings(); + } + + @Override + public ImageVersionsSettings build() throws IOException { + return new ImageVersionsSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json new file mode 100644 index 00000000..a06e4a1c --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/gapic_metadata.json @@ -0,0 +1,51 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.orchestration.airflow.service.v1beta1", + "libraryPackage": "com.google.cloud.orchestration.airflow.service.v1beta1", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "CheckUpgrade": { + "methods": ["checkUpgradeAsync", "checkUpgradeOperationCallable", "checkUpgradeCallable"] + }, + "CreateEnvironment": { + "methods": ["createEnvironmentAsync", "createEnvironmentAsync", "createEnvironmentOperationCallable", "createEnvironmentCallable"] + }, + "DeleteEnvironment": { + "methods": ["deleteEnvironmentAsync", "deleteEnvironmentAsync", "deleteEnvironmentOperationCallable", "deleteEnvironmentCallable"] + }, + "GetEnvironment": { + "methods": ["getEnvironment", "getEnvironment", "getEnvironmentCallable"] + }, + "ListEnvironments": { + "methods": ["listEnvironments", "listEnvironments", "listEnvironmentsPagedCallable", "listEnvironmentsCallable"] + }, + "RestartWebServer": { + "methods": ["restartWebServerAsync", "restartWebServerOperationCallable", "restartWebServerCallable"] + }, + "UpdateEnvironment": { + "methods": ["updateEnvironmentAsync", "updateEnvironmentAsync", "updateEnvironmentOperationCallable", "updateEnvironmentCallable"] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": ["listImageVersions", "listImageVersions", "listImageVersionsPagedCallable", "listImageVersionsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/package-info.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/package-info.java new file mode 100644 index 00000000..1d0e091d --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/package-info.java @@ -0,0 +1,51 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= EnvironmentsClient ======================= + * + *

Service Description: Managed Apache Airflow Environments. + * + *

Sample for EnvironmentsClient: + * + *

{@code
+ * try (EnvironmentsClient environmentsClient = EnvironmentsClient.create()) {
+ *   String name = "name3373707";
+ *   Environment response = environmentsClient.getEnvironment(name);
+ * }
+ * }
+ * + *

======================= ImageVersionsClient ======================= + * + *

Service Description: Readonly service to query available ImageVersions. + * + *

Sample for ImageVersionsClient: + * + *

{@code
+ * try (ImageVersionsClient imageVersionsClient = ImageVersionsClient.create()) {
+ *   String parent = "parent-995424086";
+ *   for (ImageVersion element : imageVersionsClient.listImageVersions(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import javax.annotation.Generated; diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java new file mode 100644 index 00000000..073db41b --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStub.java @@ -0,0 +1,119 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the Environments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class EnvironmentsStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public OperationCallable + createEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createEnvironmentOperationCallable()"); + } + + public UnaryCallable createEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: createEnvironmentCallable()"); + } + + public UnaryCallable getEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: getEnvironmentCallable()"); + } + + public UnaryCallable + listEnvironmentsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsPagedCallable()"); + } + + public UnaryCallable + listEnvironmentsCallable() { + throw new UnsupportedOperationException("Not implemented: listEnvironmentsCallable()"); + } + + public OperationCallable + updateEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateEnvironmentOperationCallable()"); + } + + public UnaryCallable updateEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: updateEnvironmentCallable()"); + } + + public OperationCallable + deleteEnvironmentOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteEnvironmentOperationCallable()"); + } + + public UnaryCallable deleteEnvironmentCallable() { + throw new UnsupportedOperationException("Not implemented: deleteEnvironmentCallable()"); + } + + public OperationCallable + restartWebServerOperationCallable() { + throw new UnsupportedOperationException("Not implemented: restartWebServerOperationCallable()"); + } + + public UnaryCallable restartWebServerCallable() { + throw new UnsupportedOperationException("Not implemented: restartWebServerCallable()"); + } + + public OperationCallable + checkUpgradeOperationCallable() { + throw new UnsupportedOperationException("Not implemented: checkUpgradeOperationCallable()"); + } + + public UnaryCallable checkUpgradeCallable() { + throw new UnsupportedOperationException("Not implemented: checkUpgradeCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java new file mode 100644 index 00000000..3cffc41b --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/EnvironmentsStubSettings.java @@ -0,0 +1,730 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; +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 EnvironmentsStub}. + * + *

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

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

{@code
+ * EnvironmentsStubSettings.Builder environmentsSettingsBuilder =
+ *     EnvironmentsStubSettings.newBuilder();
+ * environmentsSettingsBuilder
+ *     .getEnvironmentSettings()
+ *     .setRetrySettings(
+ *         environmentsSettingsBuilder
+ *             .getEnvironmentSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * EnvironmentsStubSettings environmentsSettings = environmentsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class EnvironmentsStubSettings 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 createEnvironmentSettings; + private final OperationCallSettings + createEnvironmentOperationSettings; + private final UnaryCallSettings getEnvironmentSettings; + private final PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + private final UnaryCallSettings updateEnvironmentSettings; + private final OperationCallSettings + updateEnvironmentOperationSettings; + private final UnaryCallSettings deleteEnvironmentSettings; + private final OperationCallSettings + deleteEnvironmentOperationSettings; + private final UnaryCallSettings restartWebServerSettings; + private final OperationCallSettings + restartWebServerOperationSettings; + private final UnaryCallSettings checkUpgradeSettings; + private final OperationCallSettings + checkUpgradeOperationSettings; + + private static final PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment> + LIST_ENVIRONMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEnvironmentsRequest, ListEnvironmentsResponse, Environment>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEnvironmentsRequest injectToken( + ListEnvironmentsRequest payload, String token) { + return ListEnvironmentsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEnvironmentsRequest injectPageSize( + ListEnvironmentsRequest payload, int pageSize) { + return ListEnvironmentsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEnvironmentsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEnvironmentsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEnvironmentsResponse payload) { + return payload.getEnvironmentsList() == null + ? ImmutableList.of() + : payload.getEnvironmentsList(); + } + }; + + private static final PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + LIST_ENVIRONMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEnvironmentsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ENVIRONMENTS_PAGE_STR_DESC, request, context); + return ListEnvironmentsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createEnvironment. */ + public UnaryCallSettings createEnvironmentSettings() { + return createEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to createEnvironment. */ + public OperationCallSettings + createEnvironmentOperationSettings() { + return createEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to getEnvironment. */ + public UnaryCallSettings getEnvironmentSettings() { + return getEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to listEnvironments. */ + public PagedCallSettings< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public UnaryCallSettings updateEnvironmentSettings() { + return updateEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to updateEnvironment. */ + public OperationCallSettings + updateEnvironmentOperationSettings() { + return updateEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings deleteEnvironmentSettings() { + return deleteEnvironmentSettings; + } + + /** Returns the object with the settings used for calls to deleteEnvironment. */ + public OperationCallSettings + deleteEnvironmentOperationSettings() { + return deleteEnvironmentOperationSettings; + } + + /** Returns the object with the settings used for calls to restartWebServer. */ + public UnaryCallSettings restartWebServerSettings() { + return restartWebServerSettings; + } + + /** Returns the object with the settings used for calls to restartWebServer. */ + public OperationCallSettings + restartWebServerOperationSettings() { + return restartWebServerOperationSettings; + } + + /** Returns the object with the settings used for calls to checkUpgrade. */ + public UnaryCallSettings checkUpgradeSettings() { + return checkUpgradeSettings; + } + + /** Returns the object with the settings used for calls to checkUpgrade. */ + public OperationCallSettings + checkUpgradeOperationSettings() { + return checkUpgradeOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public EnvironmentsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcEnvironmentsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "composer.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "composer.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(EnvironmentsStubSettings.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 EnvironmentsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createEnvironmentSettings = settingsBuilder.createEnvironmentSettings().build(); + createEnvironmentOperationSettings = + settingsBuilder.createEnvironmentOperationSettings().build(); + getEnvironmentSettings = settingsBuilder.getEnvironmentSettings().build(); + listEnvironmentsSettings = settingsBuilder.listEnvironmentsSettings().build(); + updateEnvironmentSettings = settingsBuilder.updateEnvironmentSettings().build(); + updateEnvironmentOperationSettings = + settingsBuilder.updateEnvironmentOperationSettings().build(); + deleteEnvironmentSettings = settingsBuilder.deleteEnvironmentSettings().build(); + deleteEnvironmentOperationSettings = + settingsBuilder.deleteEnvironmentOperationSettings().build(); + restartWebServerSettings = settingsBuilder.restartWebServerSettings().build(); + restartWebServerOperationSettings = settingsBuilder.restartWebServerOperationSettings().build(); + checkUpgradeSettings = settingsBuilder.checkUpgradeSettings().build(); + checkUpgradeOperationSettings = settingsBuilder.checkUpgradeOperationSettings().build(); + } + + /** Builder for EnvironmentsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createEnvironmentSettings; + private final OperationCallSettings.Builder< + CreateEnvironmentRequest, Environment, OperationMetadata> + createEnvironmentOperationSettings; + private final UnaryCallSettings.Builder + getEnvironmentSettings; + private final PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings; + private final UnaryCallSettings.Builder + updateEnvironmentSettings; + private final OperationCallSettings.Builder< + UpdateEnvironmentRequest, Environment, OperationMetadata> + updateEnvironmentOperationSettings; + private final UnaryCallSettings.Builder + deleteEnvironmentSettings; + private final OperationCallSettings.Builder + deleteEnvironmentOperationSettings; + private final UnaryCallSettings.Builder + restartWebServerSettings; + private final OperationCallSettings.Builder< + RestartWebServerRequest, Environment, OperationMetadata> + restartWebServerOperationSettings; + private final UnaryCallSettings.Builder checkUpgradeSettings; + private final OperationCallSettings.Builder< + CheckUpgradeRequest, CheckUpgradeResponse, OperationMetadata> + checkUpgradeOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + getEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listEnvironmentsSettings = PagedCallSettings.newBuilder(LIST_ENVIRONMENTS_PAGE_STR_FACT); + updateEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + deleteEnvironmentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteEnvironmentOperationSettings = OperationCallSettings.newBuilder(); + restartWebServerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + restartWebServerOperationSettings = OperationCallSettings.newBuilder(); + checkUpgradeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + checkUpgradeOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEnvironmentSettings, + getEnvironmentSettings, + listEnvironmentsSettings, + updateEnvironmentSettings, + deleteEnvironmentSettings, + restartWebServerSettings, + checkUpgradeSettings); + initDefaults(this); + } + + protected Builder(EnvironmentsStubSettings settings) { + super(settings); + + createEnvironmentSettings = settings.createEnvironmentSettings.toBuilder(); + createEnvironmentOperationSettings = settings.createEnvironmentOperationSettings.toBuilder(); + getEnvironmentSettings = settings.getEnvironmentSettings.toBuilder(); + listEnvironmentsSettings = settings.listEnvironmentsSettings.toBuilder(); + updateEnvironmentSettings = settings.updateEnvironmentSettings.toBuilder(); + updateEnvironmentOperationSettings = settings.updateEnvironmentOperationSettings.toBuilder(); + deleteEnvironmentSettings = settings.deleteEnvironmentSettings.toBuilder(); + deleteEnvironmentOperationSettings = settings.deleteEnvironmentOperationSettings.toBuilder(); + restartWebServerSettings = settings.restartWebServerSettings.toBuilder(); + restartWebServerOperationSettings = settings.restartWebServerOperationSettings.toBuilder(); + checkUpgradeSettings = settings.checkUpgradeSettings.toBuilder(); + checkUpgradeOperationSettings = settings.checkUpgradeOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createEnvironmentSettings, + getEnvironmentSettings, + listEnvironmentsSettings, + updateEnvironmentSettings, + deleteEnvironmentSettings, + restartWebServerSettings, + checkUpgradeSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listEnvironmentsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteEnvironmentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .restartWebServerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .checkUpgradeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Environment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .updateEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Environment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .deleteEnvironmentOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .restartWebServerOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Environment.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .checkUpgradeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CheckUpgradeResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + public UnaryCallSettings.Builder + createEnvironmentSettings() { + return createEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to createEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createEnvironmentOperationSettings() { + return createEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to getEnvironment. */ + public UnaryCallSettings.Builder getEnvironmentSettings() { + return getEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to listEnvironments. */ + public PagedCallSettings.Builder< + ListEnvironmentsRequest, ListEnvironmentsResponse, ListEnvironmentsPagedResponse> + listEnvironmentsSettings() { + return listEnvironmentsSettings; + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + public UnaryCallSettings.Builder + updateEnvironmentSettings() { + return updateEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to updateEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateEnvironmentOperationSettings() { + return updateEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + public UnaryCallSettings.Builder + deleteEnvironmentSettings() { + return deleteEnvironmentSettings; + } + + /** Returns the builder for the settings used for calls to deleteEnvironment. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteEnvironmentOperationSettings() { + return deleteEnvironmentOperationSettings; + } + + /** Returns the builder for the settings used for calls to restartWebServer. */ + public UnaryCallSettings.Builder + restartWebServerSettings() { + return restartWebServerSettings; + } + + /** Returns the builder for the settings used for calls to restartWebServer. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + restartWebServerOperationSettings() { + return restartWebServerOperationSettings; + } + + /** Returns the builder for the settings used for calls to checkUpgrade. */ + public UnaryCallSettings.Builder checkUpgradeSettings() { + return checkUpgradeSettings; + } + + /** Returns the builder for the settings used for calls to checkUpgrade. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CheckUpgradeRequest, CheckUpgradeResponse, OperationMetadata> + checkUpgradeOperationSettings() { + return checkUpgradeOperationSettings; + } + + @Override + public EnvironmentsStubSettings build() throws IOException { + return new EnvironmentsStubSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsCallableFactory.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsCallableFactory.java new file mode 100644 index 00000000..59b9b61a --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the Environments service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcEnvironmentsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java new file mode 100644 index 00000000..8e6f5d63 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcEnvironmentsStub.java @@ -0,0 +1,464 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +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.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.Environment; +import com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; +import com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; +import com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the Environments service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcEnvironmentsStub extends EnvironmentsStub { + private static final MethodDescriptor + createEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/CreateEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/GetEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Environment.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEnvironmentsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/ListEnvironments") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEnvironmentsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/UpdateEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteEnvironmentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/DeleteEnvironment") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + restartWebServerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/RestartWebServer") + .setRequestMarshaller( + ProtoUtils.marshaller(RestartWebServerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + checkUpgradeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.Environments/CheckUpgrade") + .setRequestMarshaller(ProtoUtils.marshaller(CheckUpgradeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createEnvironmentCallable; + private final OperationCallable + createEnvironmentOperationCallable; + private final UnaryCallable getEnvironmentCallable; + private final UnaryCallable + listEnvironmentsCallable; + private final UnaryCallable + listEnvironmentsPagedCallable; + private final UnaryCallable updateEnvironmentCallable; + private final OperationCallable + updateEnvironmentOperationCallable; + private final UnaryCallable deleteEnvironmentCallable; + private final OperationCallable + deleteEnvironmentOperationCallable; + private final UnaryCallable restartWebServerCallable; + private final OperationCallable + restartWebServerOperationCallable; + private final UnaryCallable checkUpgradeCallable; + private final OperationCallable + checkUpgradeOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcEnvironmentsStub create(EnvironmentsStubSettings settings) + throws IOException { + return new GrpcEnvironmentsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcEnvironmentsStub create(ClientContext clientContext) throws IOException { + return new GrpcEnvironmentsStub(EnvironmentsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcEnvironmentsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcEnvironmentsStub( + EnvironmentsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub(EnvironmentsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcEnvironmentsCallableFactory()); + } + + /** + * Constructs an instance of GrpcEnvironmentsStub, 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 GrpcEnvironmentsStub( + EnvironmentsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listEnvironmentsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEnvironmentsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEnvironmentsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteEnvironmentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteEnvironmentMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteEnvironmentRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings restartWebServerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(restartWebServerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RestartWebServerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings checkUpgradeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(checkUpgradeMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CheckUpgradeRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("environment", String.valueOf(request.getEnvironment())); + return params.build(); + } + }) + .build(); + + this.createEnvironmentCallable = + callableFactory.createUnaryCallable( + createEnvironmentTransportSettings, + settings.createEnvironmentSettings(), + clientContext); + this.createEnvironmentOperationCallable = + callableFactory.createOperationCallable( + createEnvironmentTransportSettings, + settings.createEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.getEnvironmentCallable = + callableFactory.createUnaryCallable( + getEnvironmentTransportSettings, settings.getEnvironmentSettings(), clientContext); + this.listEnvironmentsCallable = + callableFactory.createUnaryCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.listEnvironmentsPagedCallable = + callableFactory.createPagedCallable( + listEnvironmentsTransportSettings, settings.listEnvironmentsSettings(), clientContext); + this.updateEnvironmentCallable = + callableFactory.createUnaryCallable( + updateEnvironmentTransportSettings, + settings.updateEnvironmentSettings(), + clientContext); + this.updateEnvironmentOperationCallable = + callableFactory.createOperationCallable( + updateEnvironmentTransportSettings, + settings.updateEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.deleteEnvironmentCallable = + callableFactory.createUnaryCallable( + deleteEnvironmentTransportSettings, + settings.deleteEnvironmentSettings(), + clientContext); + this.deleteEnvironmentOperationCallable = + callableFactory.createOperationCallable( + deleteEnvironmentTransportSettings, + settings.deleteEnvironmentOperationSettings(), + clientContext, + operationsStub); + this.restartWebServerCallable = + callableFactory.createUnaryCallable( + restartWebServerTransportSettings, settings.restartWebServerSettings(), clientContext); + this.restartWebServerOperationCallable = + callableFactory.createOperationCallable( + restartWebServerTransportSettings, + settings.restartWebServerOperationSettings(), + clientContext, + operationsStub); + this.checkUpgradeCallable = + callableFactory.createUnaryCallable( + checkUpgradeTransportSettings, settings.checkUpgradeSettings(), clientContext); + this.checkUpgradeOperationCallable = + callableFactory.createOperationCallable( + checkUpgradeTransportSettings, + settings.checkUpgradeOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createEnvironmentCallable() { + return createEnvironmentCallable; + } + + @Override + public OperationCallable + createEnvironmentOperationCallable() { + return createEnvironmentOperationCallable; + } + + @Override + public UnaryCallable getEnvironmentCallable() { + return getEnvironmentCallable; + } + + @Override + public UnaryCallable + listEnvironmentsCallable() { + return listEnvironmentsCallable; + } + + @Override + public UnaryCallable + listEnvironmentsPagedCallable() { + return listEnvironmentsPagedCallable; + } + + @Override + public UnaryCallable updateEnvironmentCallable() { + return updateEnvironmentCallable; + } + + @Override + public OperationCallable + updateEnvironmentOperationCallable() { + return updateEnvironmentOperationCallable; + } + + @Override + public UnaryCallable deleteEnvironmentCallable() { + return deleteEnvironmentCallable; + } + + @Override + public OperationCallable + deleteEnvironmentOperationCallable() { + return deleteEnvironmentOperationCallable; + } + + @Override + public UnaryCallable restartWebServerCallable() { + return restartWebServerCallable; + } + + @Override + public OperationCallable + restartWebServerOperationCallable() { + return restartWebServerOperationCallable; + } + + @Override + public UnaryCallable checkUpgradeCallable() { + return checkUpgradeCallable; + } + + @Override + public OperationCallable + checkUpgradeOperationCallable() { + return checkUpgradeOperationCallable; + } + + @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-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcImageVersionsCallableFactory.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcImageVersionsCallableFactory.java new file mode 100644 index 00000000..326d8972 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcImageVersionsCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ImageVersions service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageVersionsCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcImageVersionsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcImageVersionsStub.java new file mode 100644 index 00000000..5c0aa9be --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/GrpcImageVersionsStub.java @@ -0,0 +1,183 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ImageVersions service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcImageVersionsStub extends ImageVersionsStub { + private static final MethodDescriptor + listImageVersionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions/ListImageVersions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListImageVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListImageVersionsResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable + listImageVersionsCallable; + private final UnaryCallable + listImageVersionsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcImageVersionsStub create(ImageVersionsStubSettings settings) + throws IOException { + return new GrpcImageVersionsStub(settings, ClientContext.create(settings)); + } + + public static final GrpcImageVersionsStub create(ClientContext clientContext) throws IOException { + return new GrpcImageVersionsStub(ImageVersionsStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcImageVersionsStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcImageVersionsStub( + ImageVersionsStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcImageVersionsStub, 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 GrpcImageVersionsStub(ImageVersionsStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcImageVersionsCallableFactory()); + } + + /** + * Constructs an instance of GrpcImageVersionsStub, 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 GrpcImageVersionsStub( + ImageVersionsStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listImageVersionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listImageVersionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListImageVersionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.listImageVersionsCallable = + callableFactory.createUnaryCallable( + listImageVersionsTransportSettings, + settings.listImageVersionsSettings(), + clientContext); + this.listImageVersionsPagedCallable = + callableFactory.createPagedCallable( + listImageVersionsTransportSettings, + settings.listImageVersionsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listImageVersionsCallable() { + return listImageVersionsCallable; + } + + @Override + public UnaryCallable + listImageVersionsPagedCallable() { + return listImageVersionsPagedCallable; + } + + @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-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/ImageVersionsStub.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/ImageVersionsStub.java new file mode 100644 index 00000000..a097ed63 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/ImageVersionsStub.java @@ -0,0 +1,50 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient.ListImageVersionsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ImageVersions service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ImageVersionsStub implements BackgroundResource { + + public UnaryCallable + listImageVersionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listImageVersionsPagedCallable()"); + } + + public UnaryCallable + listImageVersionsCallable() { + throw new UnsupportedOperationException("Not implemented: listImageVersionsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/ImageVersionsStubSettings.java b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/ImageVersionsStubSettings.java new file mode 100644 index 00000000..86d959bb --- /dev/null +++ b/google-cloud-orchestration-airflow/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/stub/ImageVersionsStubSettings.java @@ -0,0 +1,341 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1.stub; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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.orchestration.airflow.service.v1beta1.ImageVersion; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; +import com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; +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 java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ImageVersionsStub}. + * + *

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

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

{@code
+ * ImageVersionsStubSettings.Builder imageVersionsSettingsBuilder =
+ *     ImageVersionsStubSettings.newBuilder();
+ * imageVersionsSettingsBuilder
+ *     .listImageVersionsSettings()
+ *     .setRetrySettings(
+ *         imageVersionsSettingsBuilder
+ *             .listImageVersionsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ImageVersionsStubSettings imageVersionsSettings = imageVersionsSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ImageVersionsStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final PagedCallSettings< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings; + + private static final PagedListDescriptor< + ListImageVersionsRequest, ListImageVersionsResponse, ImageVersion> + LIST_IMAGE_VERSIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListImageVersionsRequest, ListImageVersionsResponse, ImageVersion>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListImageVersionsRequest injectToken( + ListImageVersionsRequest payload, String token) { + return ListImageVersionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListImageVersionsRequest injectPageSize( + ListImageVersionsRequest payload, int pageSize) { + return ListImageVersionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListImageVersionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListImageVersionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListImageVersionsResponse payload) { + return payload.getImageVersionsList() == null + ? ImmutableList.of() + : payload.getImageVersionsList(); + } + }; + + private static final PagedListResponseFactory< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + LIST_IMAGE_VERSIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListImageVersionsRequest, + ListImageVersionsResponse, + ListImageVersionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListImageVersionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_IMAGE_VERSIONS_PAGE_STR_DESC, request, context); + return ListImageVersionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listImageVersions. */ + public PagedCallSettings< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return listImageVersionsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ImageVersionsStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcImageVersionsStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "composer.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "composer.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ImageVersionsStubSettings.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 ImageVersionsStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listImageVersionsSettings = settingsBuilder.listImageVersionsSettings().build(); + } + + /** Builder for ImageVersionsStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listImageVersionsSettings = PagedCallSettings.newBuilder(LIST_IMAGE_VERSIONS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listImageVersionsSettings); + initDefaults(this); + } + + protected Builder(ImageVersionsStubSettings settings) { + super(settings); + + listImageVersionsSettings = settings.listImageVersionsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listImageVersionsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listImageVersionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listImageVersions. */ + public PagedCallSettings.Builder< + ListImageVersionsRequest, ListImageVersionsResponse, ListImageVersionsPagedResponse> + listImageVersionsSettings() { + return listImageVersionsSettings; + } + + @Override + public ImageVersionsStubSettings build() throws IOException { + return new ImageVersionsStubSettings(this); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java new file mode 100644 index 00000000..7b4e0c06 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsClientTest.java @@ -0,0 +1,328 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import static com.google.cloud.orchestration.airflow.service.v1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EnvironmentsClientTest { + private static MockEnvironments mockEnvironments; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private EnvironmentsClient client; + + @BeforeClass + public static void startStaticServer() { + mockEnvironments = new MockEnvironments(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockEnvironments)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + EnvironmentsSettings settings = + EnvironmentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EnvironmentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + String parent = "parent-995424086"; + Environment environment = Environment.newBuilder().build(); + + Environment actualResponse = client.createEnvironmentAsync(parent, environment).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEnvironmentRequest actualRequest = ((CreateEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(environment, actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String parent = "parent-995424086"; + Environment environment = Environment.newBuilder().build(); + client.createEnvironmentAsync(parent, environment).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockEnvironments.addResponse(expectedResponse); + + String name = "name3373707"; + + Environment actualResponse = client.getEnvironment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEnvironmentRequest actualRequest = ((GetEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String name = "name3373707"; + client.getEnvironment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEnvironmentsTest() throws Exception { + Environment responsesElement = Environment.newBuilder().build(); + ListEnvironmentsResponse expectedResponse = + ListEnvironmentsResponse.newBuilder() + .setNextPageToken("") + .addAllEnvironments(Arrays.asList(responsesElement)) + .build(); + mockEnvironments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEnvironmentsPagedResponse pagedListResponse = client.listEnvironments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEnvironmentsList().get(0), resources.get(0)); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnvironmentsRequest actualRequest = ((ListEnvironmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEnvironmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEnvironments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + String name = "name3373707"; + Environment environment = Environment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Environment actualResponse = client.updateEnvironmentAsync(name, environment, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEnvironmentRequest actualRequest = ((UpdateEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(environment, actualRequest.getEnvironment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String name = "name3373707"; + Environment environment = Environment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEnvironmentAsync(name, environment, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteEnvironmentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteEnvironmentAsync(name).get(); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEnvironmentRequest actualRequest = ((DeleteEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String name = "name3373707"; + client.deleteEnvironmentAsync(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()); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClientTest.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClientTest.java new file mode 100644 index 00000000..257a751c --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsClientTest.java @@ -0,0 +1,124 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import static com.google.cloud.orchestration.airflow.service.v1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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 io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageVersionsClientTest { + private static MockImageVersions mockImageVersions; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageVersionsClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageVersions = new MockImageVersions(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageVersions)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageVersionsSettings settings = + ImageVersionsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageVersionsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listImageVersionsTest() throws Exception { + ImageVersion responsesElement = ImageVersion.newBuilder().build(); + ListImageVersionsResponse expectedResponse = + ListImageVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllImageVersions(Arrays.asList(responsesElement)) + .build(); + mockImageVersions.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListImageVersionsPagedResponse pagedListResponse = client.listImageVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImageVersionsList().get(0), resources.get(0)); + + List actualRequests = mockImageVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListImageVersionsRequest actualRequest = ((ListImageVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listImageVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageVersions.addException(exception); + + try { + String parent = "parent-995424086"; + client.listImageVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironments.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironments.java new file mode 100644 index 00000000..8ef5e2dd --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironments.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEnvironments implements MockGrpcService { + private final MockEnvironmentsImpl serviceImpl; + + public MockEnvironments() { + serviceImpl = new MockEnvironmentsImpl(); + } + + @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-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java new file mode 100644 index 00000000..eef42b5a --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockEnvironmentsImpl.java @@ -0,0 +1,166 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.orchestration.airflow.service.v1.EnvironmentsGrpc.EnvironmentsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEnvironmentsImpl extends EnvironmentsImplBase { + private List requests; + private Queue responses; + + public MockEnvironmentsImpl() { + 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 createEnvironment( + CreateEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEnvironment( + GetEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Environment) { + requests.add(request); + responseObserver.onNext(((Environment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Environment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEnvironments( + ListEnvironmentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEnvironmentsResponse) { + requests.add(request); + responseObserver.onNext(((ListEnvironmentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEnvironments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEnvironmentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateEnvironment( + UpdateEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteEnvironment( + DeleteEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockImageVersions.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockImageVersions.java new file mode 100644 index 00000000..23bae3ca --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockImageVersions.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageVersions implements MockGrpcService { + private final MockImageVersionsImpl serviceImpl; + + public MockImageVersions() { + serviceImpl = new MockImageVersionsImpl(); + } + + @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-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockImageVersionsImpl.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockImageVersionsImpl.java new file mode 100644 index 00000000..72c8ff57 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1/MockImageVersionsImpl.java @@ -0,0 +1,82 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.orchestration.airflow.service.v1.ImageVersionsGrpc.ImageVersionsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageVersionsImpl extends ImageVersionsImplBase { + private List requests; + private Queue responses; + + public MockImageVersionsImpl() { + 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 listImageVersions( + ListImageVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListImageVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListImageVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListImageVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListImageVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java new file mode 100644 index 00000000..0af82dfb --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsClientTest.java @@ -0,0 +1,439 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient.ListEnvironmentsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class EnvironmentsClientTest { + private static MockEnvironments mockEnvironments; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private EnvironmentsClient client; + + @BeforeClass + public static void startStaticServer() { + mockEnvironments = new MockEnvironments(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockEnvironments)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + EnvironmentsSettings settings = + EnvironmentsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = EnvironmentsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + String parent = "parent-995424086"; + Environment environment = Environment.newBuilder().build(); + + Environment actualResponse = client.createEnvironmentAsync(parent, environment).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEnvironmentRequest actualRequest = ((CreateEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(environment, actualRequest.getEnvironment()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String parent = "parent-995424086"; + Environment environment = Environment.newBuilder().build(); + client.createEnvironmentAsync(parent, environment).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void getEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + mockEnvironments.addResponse(expectedResponse); + + String name = "name3373707"; + + Environment actualResponse = client.getEnvironment(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEnvironmentRequest actualRequest = ((GetEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String name = "name3373707"; + client.getEnvironment(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listEnvironmentsTest() throws Exception { + Environment responsesElement = Environment.newBuilder().build(); + ListEnvironmentsResponse expectedResponse = + ListEnvironmentsResponse.newBuilder() + .setNextPageToken("") + .addAllEnvironments(Arrays.asList(responsesElement)) + .build(); + mockEnvironments.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListEnvironmentsPagedResponse pagedListResponse = client.listEnvironments(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEnvironmentsList().get(0), resources.get(0)); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEnvironmentsRequest actualRequest = ((ListEnvironmentsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEnvironmentsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String parent = "parent-995424086"; + client.listEnvironments(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateEnvironmentTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + String name = "name3373707"; + Environment environment = Environment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Environment actualResponse = client.updateEnvironmentAsync(name, environment, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateEnvironmentRequest actualRequest = ((UpdateEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertEquals(environment, actualRequest.getEnvironment()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String name = "name3373707"; + Environment environment = Environment.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateEnvironmentAsync(name, environment, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void deleteEnvironmentTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteEnvironmentTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteEnvironmentAsync(name).get(); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteEnvironmentRequest actualRequest = ((DeleteEnvironmentRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteEnvironmentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + String name = "name3373707"; + client.deleteEnvironmentAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void restartWebServerTest() throws Exception { + Environment expectedResponse = + Environment.newBuilder() + .setName(EnvironmentName.of("[PROJECT]", "[LOCATION]", "[ENVIRONMENT]").toString()) + .setConfig(EnvironmentConfig.newBuilder().build()) + .setUuid("uuid3601339") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .putAllLabels(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("restartWebServerTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + RestartWebServerRequest request = + RestartWebServerRequest.newBuilder().setName("name3373707").build(); + + Environment actualResponse = client.restartWebServerAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RestartWebServerRequest actualRequest = ((RestartWebServerRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void restartWebServerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + RestartWebServerRequest request = + RestartWebServerRequest.newBuilder().setName("name3373707").build(); + client.restartWebServerAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void checkUpgradeTest() throws Exception { + CheckUpgradeResponse expectedResponse = + CheckUpgradeResponse.newBuilder() + .setBuildLogUri("buildLogUri2048482198") + .setPypiConflictBuildLogExtract("pypiConflictBuildLogExtract-1257030825") + .setImageVersion("imageVersion949870333") + .putAllPypiDependencies(new HashMap()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("checkUpgradeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockEnvironments.addResponse(resultOperation); + + CheckUpgradeRequest request = + CheckUpgradeRequest.newBuilder() + .setEnvironment("environment-85904877") + .setImageVersion("imageVersion949870333") + .build(); + + CheckUpgradeResponse actualResponse = client.checkUpgradeAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockEnvironments.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CheckUpgradeRequest actualRequest = ((CheckUpgradeRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getEnvironment(), actualRequest.getEnvironment()); + Assert.assertEquals(request.getImageVersion(), actualRequest.getImageVersion()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void checkUpgradeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockEnvironments.addException(exception); + + try { + CheckUpgradeRequest request = + CheckUpgradeRequest.newBuilder() + .setEnvironment("environment-85904877") + .setImageVersion("imageVersion949870333") + .build(); + client.checkUpgradeAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsClientTest.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsClientTest.java new file mode 100644 index 00000000..0169c279 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsClientTest.java @@ -0,0 +1,124 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient.ListImageVersionsPagedResponse; + +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 io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ImageVersionsClientTest { + private static MockImageVersions mockImageVersions; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ImageVersionsClient client; + + @BeforeClass + public static void startStaticServer() { + mockImageVersions = new MockImageVersions(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockImageVersions)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ImageVersionsSettings settings = + ImageVersionsSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ImageVersionsClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listImageVersionsTest() throws Exception { + ImageVersion responsesElement = ImageVersion.newBuilder().build(); + ListImageVersionsResponse expectedResponse = + ListImageVersionsResponse.newBuilder() + .setNextPageToken("") + .addAllImageVersions(Arrays.asList(responsesElement)) + .build(); + mockImageVersions.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListImageVersionsPagedResponse pagedListResponse = client.listImageVersions(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getImageVersionsList().get(0), resources.get(0)); + + List actualRequests = mockImageVersions.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListImageVersionsRequest actualRequest = ((ListImageVersionsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listImageVersionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockImageVersions.addException(exception); + + try { + String parent = "parent-995424086"; + client.listImageVersions(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironments.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironments.java new file mode 100644 index 00000000..5bf4ec5f --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironments.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEnvironments implements MockGrpcService { + private final MockEnvironmentsImpl serviceImpl; + + public MockEnvironments() { + serviceImpl = new MockEnvironmentsImpl(); + } + + @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-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java new file mode 100644 index 00000000..7ffa8067 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockEnvironmentsImpl.java @@ -0,0 +1,208 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsGrpc.EnvironmentsImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockEnvironmentsImpl extends EnvironmentsImplBase { + private List requests; + private Queue responses; + + public MockEnvironmentsImpl() { + 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 createEnvironment( + CreateEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getEnvironment( + GetEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Environment) { + requests.add(request); + responseObserver.onNext(((Environment) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Environment.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listEnvironments( + ListEnvironmentsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListEnvironmentsResponse) { + requests.add(request); + responseObserver.onNext(((ListEnvironmentsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListEnvironments, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListEnvironmentsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateEnvironment( + UpdateEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteEnvironment( + DeleteEnvironmentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteEnvironment, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void restartWebServer( + RestartWebServerRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method RestartWebServer, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void checkUpgrade( + CheckUpgradeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CheckUpgrade, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockImageVersions.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockImageVersions.java new file mode 100644 index 00000000..407753c6 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockImageVersions.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageVersions implements MockGrpcService { + private final MockImageVersionsImpl serviceImpl; + + public MockImageVersions() { + serviceImpl = new MockImageVersionsImpl(); + } + + @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-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockImageVersionsImpl.java b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockImageVersionsImpl.java new file mode 100644 index 00000000..e54988c8 --- /dev/null +++ b/google-cloud-orchestration-airflow/src/test/java/com/google/cloud/orchestration/airflow/service/v1beta1/MockImageVersionsImpl.java @@ -0,0 +1,82 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsGrpc.ImageVersionsImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockImageVersionsImpl extends ImageVersionsImplBase { + private List requests; + private Queue responses; + + public MockImageVersionsImpl() { + 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 listImageVersions( + ListImageVersionsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListImageVersionsResponse) { + requests.add(request); + responseObserver.onNext(((ListImageVersionsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListImageVersions, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListImageVersionsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/grpc-google-cloud-orchestration-airflow-v1/pom.xml b/grpc-google-cloud-orchestration-airflow-v1/pom.xml new file mode 100644 index 00000000..c1b2b587 --- /dev/null +++ b/grpc-google-cloud-orchestration-airflow-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-orchestration-airflow-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-orchestration-airflow-v1 + GRPC library for google-cloud-orchestration-airflow + + com.google.cloud + google-cloud-orchestration-airflow-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-orchestration-airflow-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java b/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java new file mode 100644 index 00000000..e84bcf80 --- /dev/null +++ b/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsGrpc.java @@ -0,0 +1,845 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.orchestration.airflow.service.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Managed Apache Airflow Environments.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/orchestration/airflow/service/v1/environments.proto") +public final class EnvironmentsGrpc { + + private EnvironmentsGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.orchestration.airflow.service.v1.Environments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod; + if ((getCreateEnvironmentMethod = EnvironmentsGrpc.getCreateEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getCreateEnvironmentMethod = EnvironmentsGrpc.getCreateEnvironmentMethod) == null) { + EnvironmentsGrpc.getCreateEnvironmentMethod = + getCreateEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .CreateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("CreateEnvironment")) + .build(); + } + } + } + return getCreateEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1.Environment> + getGetEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEnvironment", + requestType = com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.class, + responseType = com.google.cloud.orchestration.airflow.service.v1.Environment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1.Environment> + getGetEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1.Environment> + getGetEnvironmentMethod; + if ((getGetEnvironmentMethod = EnvironmentsGrpc.getGetEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getGetEnvironmentMethod = EnvironmentsGrpc.getGetEnvironmentMethod) == null) { + EnvironmentsGrpc.getGetEnvironmentMethod = + getGetEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .GetEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1.Environment + .getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("GetEnvironment")) + .build(); + } + } + } + return getGetEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEnvironments", + requestType = com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse> + getListEnvironmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + EnvironmentsGrpc.getListEnvironmentsMethod = + getListEnvironmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEnvironments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .ListEnvironmentsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ListEnvironments")) + .build(); + } + } + } + return getListEnvironmentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, + com.google.longrunning.Operation> + getUpdateEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, + com.google.longrunning.Operation> + getUpdateEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, + com.google.longrunning.Operation> + getUpdateEnvironmentMethod; + if ((getUpdateEnvironmentMethod = EnvironmentsGrpc.getUpdateEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getUpdateEnvironmentMethod = EnvironmentsGrpc.getUpdateEnvironmentMethod) == null) { + EnvironmentsGrpc.getUpdateEnvironmentMethod = + getUpdateEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .UpdateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("UpdateEnvironment")) + .build(); + } + } + } + return getUpdateEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod; + if ((getDeleteEnvironmentMethod = EnvironmentsGrpc.getDeleteEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getDeleteEnvironmentMethod = EnvironmentsGrpc.getDeleteEnvironmentMethod) == null) { + EnvironmentsGrpc.getDeleteEnvironmentMethod = + getDeleteEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .DeleteEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("DeleteEnvironment")) + .build(); + } + } + } + return getDeleteEnvironmentMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EnvironmentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + }; + return EnvironmentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EnvironmentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + }; + return EnvironmentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EnvironmentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + }; + return EnvironmentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public abstract static class EnvironmentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public void createEnvironment( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public void getEnvironment( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEnvironmentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public void updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public void deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteEnvironmentMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_ENVIRONMENT))) + .addMethod( + getGetEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1.Environment>( + this, METHODID_GET_ENVIRONMENT))) + .addMethod( + getListEnvironmentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse>( + this, METHODID_LIST_ENVIRONMENTS))) + .addMethod( + getUpdateEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_ENVIRONMENT))) + .addMethod( + getDeleteEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_ENVIRONMENT))) + .build(); + } + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public static final class EnvironmentsStub + extends io.grpc.stub.AbstractAsyncStub { + private EnvironmentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public void createEnvironment( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public void getEnvironment( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public void updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public void deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public static final class EnvironmentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EnvironmentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public com.google.longrunning.Operation createEnvironment( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + listEnvironments( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEnvironmentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public com.google.longrunning.Operation updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public com.google.longrunning.Operation deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteEnvironmentMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public static final class EnvironmentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EnvironmentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEnvironment( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.Environment> + getEnvironment( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse> + listEnvironments( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_ENVIRONMENT = 0; + private static final int METHODID_GET_ENVIRONMENT = 1; + private static final int METHODID_LIST_ENVIRONMENTS = 2; + private static final int METHODID_UPDATE_ENVIRONMENT = 3; + private static final int METHODID_DELETE_ENVIRONMENT = 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 EnvironmentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EnvironmentsImplBase 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_ENVIRONMENT: + serviceImpl.createEnvironment( + (com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ENVIRONMENT: + serviceImpl.getEnvironment( + (com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.Environment>) + responseObserver); + break; + case METHODID_LIST_ENVIRONMENTS: + serviceImpl.listEnvironments( + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse>) + responseObserver); + break; + case METHODID_UPDATE_ENVIRONMENT: + serviceImpl.updateEnvironment( + (com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ENVIRONMENT: + serviceImpl.deleteEnvironment( + (com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) 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 EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EnvironmentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Environments"); + } + } + + private static final class EnvironmentsFileDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier { + EnvironmentsFileDescriptorSupplier() {} + } + + private static final class EnvironmentsMethodDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EnvironmentsMethodDescriptorSupplier(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 (EnvironmentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EnvironmentsFileDescriptorSupplier()) + .addMethod(getCreateEnvironmentMethod()) + .addMethod(getGetEnvironmentMethod()) + .addMethod(getListEnvironmentsMethod()) + .addMethod(getUpdateEnvironmentMethod()) + .addMethod(getDeleteEnvironmentMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsGrpc.java b/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsGrpc.java new file mode 100644 index 00000000..da6da584 --- /dev/null +++ b/grpc-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsGrpc.java @@ -0,0 +1,372 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.orchestration.airflow.service.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Readonly service to query available ImageVersions.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/orchestration/airflow/service/v1/image_versions.proto") +public final class ImageVersionsGrpc { + + private ImageVersionsGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.orchestration.airflow.service.v1.ImageVersions"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse> + getListImageVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListImageVersions", + requestType = + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse> + getListImageVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse> + getListImageVersionsMethod; + if ((getListImageVersionsMethod = ImageVersionsGrpc.getListImageVersionsMethod) == null) { + synchronized (ImageVersionsGrpc.class) { + if ((getListImageVersionsMethod = ImageVersionsGrpc.getListImageVersionsMethod) == null) { + ImageVersionsGrpc.getListImageVersionsMethod = + getListImageVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListImageVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .ListImageVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1 + .ListImageVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ImageVersionsMethodDescriptorSupplier("ListImageVersions")) + .build(); + } + } + } + return getListImageVersionsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ImageVersionsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageVersionsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsStub(channel, callOptions); + } + }; + return ImageVersionsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageVersionsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageVersionsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsBlockingStub(channel, callOptions); + } + }; + return ImageVersionsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ImageVersionsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageVersionsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsFutureStub(channel, callOptions); + } + }; + return ImageVersionsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public abstract static class ImageVersionsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public void listImageVersions( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListImageVersionsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListImageVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse>( + this, METHODID_LIST_IMAGE_VERSIONS))) + .build(); + } + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public static final class ImageVersionsStub + extends io.grpc.stub.AbstractAsyncStub { + private ImageVersionsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageVersionsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsStub(channel, callOptions); + } + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public void listImageVersions( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListImageVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public static final class ImageVersionsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ImageVersionsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageVersionsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + listImageVersions( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListImageVersionsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public static final class ImageVersionsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ImageVersionsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageVersionsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse> + listImageVersions( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListImageVersionsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_IMAGE_VERSIONS = 0; + + 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 ImageVersionsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageVersionsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_IMAGE_VERSIONS: + serviceImpl.listImageVersions( + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse>) + 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 ImageVersionsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageVersionsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageVersions"); + } + } + + private static final class ImageVersionsFileDescriptorSupplier + extends ImageVersionsBaseDescriptorSupplier { + ImageVersionsFileDescriptorSupplier() {} + } + + private static final class ImageVersionsMethodDescriptorSupplier + extends ImageVersionsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageVersionsMethodDescriptorSupplier(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 (ImageVersionsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageVersionsFileDescriptorSupplier()) + .addMethod(getListImageVersionsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml b/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml new file mode 100644 index 00000000..b0257591 --- /dev/null +++ b/grpc-google-cloud-orchestration-airflow-v1beta1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-orchestration-airflow-v1beta1 + 0.0.1-SNAPSHOT + grpc-google-cloud-orchestration-airflow-v1beta1 + GRPC library for google-cloud-orchestration-airflow + + com.google.cloud + google-cloud-orchestration-airflow-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-cloud-orchestration-airflow-v1beta1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java b/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java new file mode 100644 index 00000000..691a8c08 --- /dev/null +++ b/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsGrpc.java @@ -0,0 +1,1110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Managed Apache Airflow Environments.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto") +public final class EnvironmentsGrpc { + + private EnvironmentsGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.orchestration.airflow.service.v1beta1.Environments"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, + com.google.longrunning.Operation> + getCreateEnvironmentMethod; + if ((getCreateEnvironmentMethod = EnvironmentsGrpc.getCreateEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getCreateEnvironmentMethod = EnvironmentsGrpc.getCreateEnvironmentMethod) == null) { + EnvironmentsGrpc.getCreateEnvironmentMethod = + getCreateEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .CreateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("CreateEnvironment")) + .build(); + } + } + } + return getCreateEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + getGetEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.class, + responseType = com.google.cloud.orchestration.airflow.service.v1beta1.Environment.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + getGetEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + getGetEnvironmentMethod; + if ((getGetEnvironmentMethod = EnvironmentsGrpc.getGetEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getGetEnvironmentMethod = EnvironmentsGrpc.getGetEnvironmentMethod) == null) { + EnvironmentsGrpc.getGetEnvironmentMethod = + getGetEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .GetEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("GetEnvironment")) + .build(); + } + } + } + return getGetEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEnvironments", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse> + getListEnvironmentsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse> + getListEnvironmentsMethod; + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getListEnvironmentsMethod = EnvironmentsGrpc.getListEnvironmentsMethod) == null) { + EnvironmentsGrpc.getListEnvironmentsMethod = + getListEnvironmentsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEnvironments")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("ListEnvironments")) + .build(); + } + } + } + return getListEnvironmentsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, + com.google.longrunning.Operation> + getUpdateEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, + com.google.longrunning.Operation> + getUpdateEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, + com.google.longrunning.Operation> + getUpdateEnvironmentMethod; + if ((getUpdateEnvironmentMethod = EnvironmentsGrpc.getUpdateEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getUpdateEnvironmentMethod = EnvironmentsGrpc.getUpdateEnvironmentMethod) == null) { + EnvironmentsGrpc.getUpdateEnvironmentMethod = + getUpdateEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .UpdateEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("UpdateEnvironment")) + .build(); + } + } + } + return getUpdateEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteEnvironment", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, + com.google.longrunning.Operation> + getDeleteEnvironmentMethod; + if ((getDeleteEnvironmentMethod = EnvironmentsGrpc.getDeleteEnvironmentMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getDeleteEnvironmentMethod = EnvironmentsGrpc.getDeleteEnvironmentMethod) == null) { + EnvironmentsGrpc.getDeleteEnvironmentMethod = + getDeleteEnvironmentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEnvironment")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .DeleteEnvironmentRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("DeleteEnvironment")) + .build(); + } + } + } + return getDeleteEnvironmentMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, + com.google.longrunning.Operation> + getRestartWebServerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RestartWebServer", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, + com.google.longrunning.Operation> + getRestartWebServerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, + com.google.longrunning.Operation> + getRestartWebServerMethod; + if ((getRestartWebServerMethod = EnvironmentsGrpc.getRestartWebServerMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getRestartWebServerMethod = EnvironmentsGrpc.getRestartWebServerMethod) == null) { + EnvironmentsGrpc.getRestartWebServerMethod = + getRestartWebServerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestartWebServer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .RestartWebServerRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new EnvironmentsMethodDescriptorSupplier("RestartWebServer")) + .build(); + } + } + } + return getRestartWebServerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, + com.google.longrunning.Operation> + getCheckUpgradeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CheckUpgrade", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, + com.google.longrunning.Operation> + getCheckUpgradeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, + com.google.longrunning.Operation> + getCheckUpgradeMethod; + if ((getCheckUpgradeMethod = EnvironmentsGrpc.getCheckUpgradeMethod) == null) { + synchronized (EnvironmentsGrpc.class) { + if ((getCheckUpgradeMethod = EnvironmentsGrpc.getCheckUpgradeMethod) == null) { + EnvironmentsGrpc.getCheckUpgradeMethod = + getCheckUpgradeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CheckUpgrade")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .CheckUpgradeRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new EnvironmentsMethodDescriptorSupplier("CheckUpgrade")) + .build(); + } + } + } + return getCheckUpgradeMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static EnvironmentsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + }; + return EnvironmentsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static EnvironmentsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + }; + return EnvironmentsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static EnvironmentsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public EnvironmentsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + }; + return EnvironmentsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public abstract static class EnvironmentsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public void createEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public void getEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListEnvironmentsMethod(), responseObserver); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public void updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public void deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteEnvironmentMethod(), responseObserver); + } + + /** + * + * + *
+     * Restart Airflow web server.
+     * 
+ */ + public void restartWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRestartWebServerMethod(), responseObserver); + } + + /** + * + * + *
+     * Check if an upgrade operation on the environment will succeed.
+     * In case of problems detailed info can be found in the returned Operation.
+     * 
+ */ + public void checkUpgrade( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCheckUpgradeMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .CreateEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_ENVIRONMENT))) + .addMethod( + getGetEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment>( + this, METHODID_GET_ENVIRONMENT))) + .addMethod( + getListEnvironmentsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsResponse>(this, METHODID_LIST_ENVIRONMENTS))) + .addMethod( + getUpdateEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .UpdateEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_UPDATE_ENVIRONMENT))) + .addMethod( + getDeleteEnvironmentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .DeleteEnvironmentRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_ENVIRONMENT))) + .addMethod( + getRestartWebServerMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .RestartWebServerRequest, + com.google.longrunning.Operation>(this, METHODID_RESTART_WEB_SERVER))) + .addMethod( + getCheckUpgradeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, + com.google.longrunning.Operation>(this, METHODID_CHECK_UPGRADE))) + .build(); + } + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public static final class EnvironmentsStub + extends io.grpc.stub.AbstractAsyncStub { + private EnvironmentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public void createEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public void getEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public void listEnvironments( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public void updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public void deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Restart Airflow web server.
+     * 
+ */ + public void restartWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRestartWebServerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Check if an upgrade operation on the environment will succeed.
+     * In case of problems detailed info can be found in the returned Operation.
+     * 
+ */ + public void checkUpgrade( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCheckUpgradeMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public static final class EnvironmentsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private EnvironmentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public com.google.longrunning.Operation createEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + listEnvironments( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListEnvironmentsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public com.google.longrunning.Operation updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public com.google.longrunning.Operation deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteEnvironmentMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Restart Airflow web server.
+     * 
+ */ + public com.google.longrunning.Operation restartWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRestartWebServerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Check if an upgrade operation on the environment will succeed.
+     * In case of problems detailed info can be found in the returned Operation.
+     * 
+ */ + public com.google.longrunning.Operation checkUpgrade( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCheckUpgradeMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Managed Apache Airflow Environments.
+   * 
+ */ + public static final class EnvironmentsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private EnvironmentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected EnvironmentsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new EnvironmentsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a new environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Get an existing environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + getEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List environments.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse> + listEnvironments( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListEnvironmentsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update an environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Delete an environment.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteEnvironmentMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Restart Airflow web server.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + restartWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRestartWebServerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Check if an upgrade operation on the environment will succeed.
+     * In case of problems detailed info can be found in the returned Operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + checkUpgrade( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCheckUpgradeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_ENVIRONMENT = 0; + private static final int METHODID_GET_ENVIRONMENT = 1; + private static final int METHODID_LIST_ENVIRONMENTS = 2; + private static final int METHODID_UPDATE_ENVIRONMENT = 3; + private static final int METHODID_DELETE_ENVIRONMENT = 4; + private static final int METHODID_RESTART_WEB_SERVER = 5; + private static final int METHODID_CHECK_UPGRADE = 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 EnvironmentsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(EnvironmentsImplBase 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_ENVIRONMENT: + serviceImpl.createEnvironment( + (com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_ENVIRONMENT: + serviceImpl.getEnvironment( + (com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment>) + responseObserver); + break; + case METHODID_LIST_ENVIRONMENTS: + serviceImpl.listEnvironments( + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsResponse>) + responseObserver); + break; + case METHODID_UPDATE_ENVIRONMENT: + serviceImpl.updateEnvironment( + (com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_ENVIRONMENT: + serviceImpl.deleteEnvironment( + (com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESTART_WEB_SERVER: + serviceImpl.restartWebServer( + (com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHECK_UPGRADE: + serviceImpl.checkUpgrade( + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) 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 EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + EnvironmentsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Environments"); + } + } + + private static final class EnvironmentsFileDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier { + EnvironmentsFileDescriptorSupplier() {} + } + + private static final class EnvironmentsMethodDescriptorSupplier + extends EnvironmentsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + EnvironmentsMethodDescriptorSupplier(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 (EnvironmentsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new EnvironmentsFileDescriptorSupplier()) + .addMethod(getCreateEnvironmentMethod()) + .addMethod(getGetEnvironmentMethod()) + .addMethod(getListEnvironmentsMethod()) + .addMethod(getUpdateEnvironmentMethod()) + .addMethod(getDeleteEnvironmentMethod()) + .addMethod(getRestartWebServerMethod()) + .addMethod(getCheckUpgradeMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsGrpc.java b/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsGrpc.java new file mode 100644 index 00000000..5d3d547f --- /dev/null +++ b/grpc-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsGrpc.java @@ -0,0 +1,378 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Readonly service to query available ImageVersions.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto") +public final class ImageVersionsGrpc { + + private ImageVersionsGrpc() {} + + public static final String SERVICE_NAME = + "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse> + getListImageVersionsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListImageVersions", + requestType = + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.class, + responseType = + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse> + getListImageVersionsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse> + getListImageVersionsMethod; + if ((getListImageVersionsMethod = ImageVersionsGrpc.getListImageVersionsMethod) == null) { + synchronized (ImageVersionsGrpc.class) { + if ((getListImageVersionsMethod = ImageVersionsGrpc.getListImageVersionsMethod) == null) { + ImageVersionsGrpc.getListImageVersionsMethod = + getListImageVersionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListImageVersions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ImageVersionsMethodDescriptorSupplier("ListImageVersions")) + .build(); + } + } + } + return getListImageVersionsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ImageVersionsStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageVersionsStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsStub(channel, callOptions); + } + }; + return ImageVersionsStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ImageVersionsBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageVersionsBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsBlockingStub(channel, callOptions); + } + }; + return ImageVersionsBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ImageVersionsFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ImageVersionsFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsFutureStub(channel, callOptions); + } + }; + return ImageVersionsFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public abstract static class ImageVersionsImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public void listImageVersions( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListImageVersionsMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListImageVersionsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsRequest, + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsResponse>(this, METHODID_LIST_IMAGE_VERSIONS))) + .build(); + } + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public static final class ImageVersionsStub + extends io.grpc.stub.AbstractAsyncStub { + private ImageVersionsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageVersionsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsStub(channel, callOptions); + } + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public void listImageVersions( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListImageVersionsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public static final class ImageVersionsBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ImageVersionsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageVersionsBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + listImageVersions( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListImageVersionsMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Readonly service to query available ImageVersions.
+   * 
+ */ + public static final class ImageVersionsFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ImageVersionsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ImageVersionsFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ImageVersionsFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * List ImageVersions for provided location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse> + listImageVersions( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListImageVersionsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_IMAGE_VERSIONS = 0; + + 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 ImageVersionsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ImageVersionsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_IMAGE_VERSIONS: + serviceImpl.listImageVersions( + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsResponse>) + 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 ImageVersionsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ImageVersionsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ImageVersions"); + } + } + + private static final class ImageVersionsFileDescriptorSupplier + extends ImageVersionsBaseDescriptorSupplier { + ImageVersionsFileDescriptorSupplier() {} + } + + private static final class ImageVersionsMethodDescriptorSupplier + extends ImageVersionsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ImageVersionsMethodDescriptorSupplier(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 (ImageVersionsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ImageVersionsFileDescriptorSupplier()) + .addMethod(getListImageVersionsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 00000000..d0970ba7 --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 00000000..6597fced --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 00000000..77243461 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates() \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..f8297d5d --- /dev/null +++ b/pom.xml @@ -0,0 +1,200 @@ + + + 4.0.0 + com.google.cloud + google-cloud-orchestration-airflow-parent + pom + 0.0.1-SNAPSHOT + Google Cloud Composer Parent + https://github.com/googleapis/java-orchestration-airflow + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.12.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-orchestration-airflow.git + scm:git:git@github.com:googleapis/java-orchestration-airflow.git + https://github.com/googleapis/java-orchestration-airflow + HEAD + + + https://github.com/googleapis/java-orchestration-airflow/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-orchestration-airflow-parent + + + + + + com.google.cloud + google-cloud-orchestration-airflow + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-orchestration-airflow-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-orchestration-airflow-v1beta1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-orchestration-airflow-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-orchestration-airflow-v1beta1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 1.3.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-orchestration-airflow + grpc-google-cloud-orchestration-airflow-v1 + grpc-google-cloud-orchestration-airflow-v1beta1 + proto-google-cloud-orchestration-airflow-v1 + proto-google-cloud-orchestration-airflow-v1beta1 + google-cloud-orchestration-airflow-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-orchestration-airflow-v1/clirr-ignored-differences.xml b/proto-google-cloud-orchestration-airflow-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..780ea331 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/orchestration/airflow/service/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/orchestration/airflow/service/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/orchestration/airflow/service/v1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-orchestration-airflow-v1/pom.xml b/proto-google-cloud-orchestration-airflow-v1/pom.xml new file mode 100644 index 00000000..3834ad02 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-orchestration-airflow-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-orchestration-airflow-v1 + Proto library for google-cloud-orchestration-airflow + + com.google.cloud + google-cloud-orchestration-airflow-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CheckUpgradeResponse.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CheckUpgradeResponse.java new file mode 100644 index 00000000..eba0f38c --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CheckUpgradeResponse.java @@ -0,0 +1,1722 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Message containing information about the result of an upgrade check
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} + */ +public final class CheckUpgradeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + CheckUpgradeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckUpgradeResponse.newBuilder() to construct. + private CheckUpgradeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CheckUpgradeResponse() { + buildLogUri_ = ""; + containsPypiModulesConflict_ = 0; + pypiConflictBuildLogExtract_ = ""; + imageVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckUpgradeResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckUpgradeResponse( + 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(); + + buildLogUri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pypiConflictBuildLogExtract_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + containsPypiModulesConflict_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageVersion_ = s; + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pypiDependencies_ = + com.google.protobuf.MapField.newMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry pypiDependencies__ = + input.readMessage( + PypiDependenciesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + pypiDependencies_ + .getMutableMap() + .put(pypiDependencies__.getKey(), pypiDependencies__.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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetPypiDependencies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.class, + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.Builder.class); + } + + /** + * + * + *
+   * Whether there were python modules conflict during image build.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult} + */ + public enum ConflictResult implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * It is unknown whether build had conflicts or not.
+     * 
+ * + * CONFLICT_RESULT_UNSPECIFIED = 0; + */ + CONFLICT_RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * There were python packages conflicts.
+     * 
+ * + * CONFLICT = 1; + */ + CONFLICT(1), + /** + * + * + *
+     * There were no python packages conflicts.
+     * 
+ * + * NO_CONFLICT = 2; + */ + NO_CONFLICT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * It is unknown whether build had conflicts or not.
+     * 
+ * + * CONFLICT_RESULT_UNSPECIFIED = 0; + */ + public static final int CONFLICT_RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * There were python packages conflicts.
+     * 
+ * + * CONFLICT = 1; + */ + public static final int CONFLICT_VALUE = 1; + /** + * + * + *
+     * There were no python packages conflicts.
+     * 
+ * + * NO_CONFLICT = 2; + */ + public static final int NO_CONFLICT_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 ConflictResult 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 ConflictResult forNumber(int value) { + switch (value) { + case 0: + return CONFLICT_RESULT_UNSPECIFIED; + case 1: + return CONFLICT; + case 2: + return NO_CONFLICT; + 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 ConflictResult findValueByNumber(int number) { + return ConflictResult.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.orchestration.airflow.service.v1.CheckUpgradeResponse.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ConflictResult[] VALUES = values(); + + public static ConflictResult 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 ConflictResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult) + } + + public static final int BUILD_LOG_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object buildLogUri_; + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildLogUri. + */ + @java.lang.Override + public java.lang.String getBuildLogUri() { + java.lang.Object ref = buildLogUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildLogUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildLogUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildLogUriBytes() { + java.lang.Object ref = buildLogUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildLogUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINS_PYPI_MODULES_CONFLICT_FIELD_NUMBER = 4; + private int containsPypiModulesConflict_; + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for containsPypiModulesConflict. + */ + @java.lang.Override + public int getContainsPypiModulesConflictValue() { + return containsPypiModulesConflict_; + } + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The containsPypiModulesConflict. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + getContainsPypiModulesConflict() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult result = + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + .valueOf(containsPypiModulesConflict_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + .UNRECOGNIZED + : result; + } + + public static final int PYPI_CONFLICT_BUILD_LOG_EXTRACT_FIELD_NUMBER = 3; + private volatile java.lang.Object pypiConflictBuildLogExtract_; + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pypiConflictBuildLogExtract. + */ + @java.lang.Override + public java.lang.String getPypiConflictBuildLogExtract() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pypiConflictBuildLogExtract_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pypiConflictBuildLogExtract. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPypiConflictBuildLogExtractBytes() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pypiConflictBuildLogExtract_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_VERSION_FIELD_NUMBER = 5; + private volatile java.lang.Object imageVersion_; + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @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; + } + } + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @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 PYPI_DEPENDENCIES_FIELD_NUMBER = 6; + + private static final class PypiDependenciesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField pypiDependencies_; + + private com.google.protobuf.MapField + internalGetPypiDependencies() { + if (pypiDependencies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + } + return pypiDependencies_; + } + + public int getPypiDependenciesCount() { + return internalGetPypiDependencies().getMap().size(); + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public boolean containsPypiDependencies(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiDependencies().getMap().containsKey(key); + } + /** Use {@link #getPypiDependenciesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiDependencies() { + return getPypiDependenciesMap(); + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.util.Map getPypiDependenciesMap() { + return internalGetPypiDependencies().getMap(); + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiDependencies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiDependencies().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 (!getBuildLogUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildLogUri_); + } + if (!getPypiConflictBuildLogExtractBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pypiConflictBuildLogExtract_); + } + if (containsPypiModulesConflict_ + != com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + .CONFLICT_RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, containsPypiModulesConflict_); + } + if (!getImageVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, imageVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetPypiDependencies(), PypiDependenciesDefaultEntryHolder.defaultEntry, 6); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBuildLogUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildLogUri_); + } + if (!getPypiConflictBuildLogExtractBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pypiConflictBuildLogExtract_); + } + if (containsPypiModulesConflict_ + != com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + .CONFLICT_RESULT_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(4, containsPypiModulesConflict_); + } + if (!getImageVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, imageVersion_); + } + for (java.util.Map.Entry entry : + internalGetPypiDependencies().getMap().entrySet()) { + com.google.protobuf.MapEntry pypiDependencies__ = + PypiDependenciesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, pypiDependencies__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse other = + (com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) obj; + + if (!getBuildLogUri().equals(other.getBuildLogUri())) return false; + if (containsPypiModulesConflict_ != other.containsPypiModulesConflict_) return false; + if (!getPypiConflictBuildLogExtract().equals(other.getPypiConflictBuildLogExtract())) + return false; + if (!getImageVersion().equals(other.getImageVersion())) return false; + if (!internalGetPypiDependencies().equals(other.internalGetPypiDependencies())) return false; + if (!unknownFields.equals(other.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) + BUILD_LOG_URI_FIELD_NUMBER; + hash = (53 * hash) + getBuildLogUri().hashCode(); + hash = (37 * hash) + CONTAINS_PYPI_MODULES_CONFLICT_FIELD_NUMBER; + hash = (53 * hash) + containsPypiModulesConflict_; + hash = (37 * hash) + PYPI_CONFLICT_BUILD_LOG_EXTRACT_FIELD_NUMBER; + hash = (53 * hash) + getPypiConflictBuildLogExtract().hashCode(); + hash = (37 * hash) + IMAGE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getImageVersion().hashCode(); + if (!internalGetPypiDependencies().getMap().isEmpty()) { + hash = (37 * hash) + PYPI_DEPENDENCIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetPypiDependencies().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message containing information about the result of an upgrade check
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetPypiDependencies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutablePypiDependencies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.class, + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + buildLogUri_ = ""; + + containsPypiModulesConflict_ = 0; + + pypiConflictBuildLogExtract_ = ""; + + imageVersion_ = ""; + + internalGetMutablePypiDependencies().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse build() { + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse result = + new com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(this); + int from_bitField0_ = bitField0_; + result.buildLogUri_ = buildLogUri_; + result.containsPypiModulesConflict_ = containsPypiModulesConflict_; + result.pypiConflictBuildLogExtract_ = pypiConflictBuildLogExtract_; + result.imageVersion_ = imageVersion_; + result.pypiDependencies_ = internalGetPypiDependencies(); + result.pypiDependencies_.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.orchestration.airflow.service.v1.CheckUpgradeResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + .getDefaultInstance()) return this; + if (!other.getBuildLogUri().isEmpty()) { + buildLogUri_ = other.buildLogUri_; + onChanged(); + } + if (other.containsPypiModulesConflict_ != 0) { + setContainsPypiModulesConflictValue(other.getContainsPypiModulesConflictValue()); + } + if (!other.getPypiConflictBuildLogExtract().isEmpty()) { + pypiConflictBuildLogExtract_ = other.pypiConflictBuildLogExtract_; + onChanged(); + } + if (!other.getImageVersion().isEmpty()) { + imageVersion_ = other.imageVersion_; + onChanged(); + } + internalGetMutablePypiDependencies().mergeFrom(other.internalGetPypiDependencies()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object buildLogUri_ = ""; + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildLogUri. + */ + public java.lang.String getBuildLogUri() { + java.lang.Object ref = buildLogUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildLogUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildLogUri. + */ + public com.google.protobuf.ByteString getBuildLogUriBytes() { + java.lang.Object ref = buildLogUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildLogUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The buildLogUri to set. + * @return This builder for chaining. + */ + public Builder setBuildLogUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildLogUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBuildLogUri() { + + buildLogUri_ = getDefaultInstance().getBuildLogUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for buildLogUri to set. + * @return This builder for chaining. + */ + public Builder setBuildLogUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildLogUri_ = value; + onChanged(); + return this; + } + + private int containsPypiModulesConflict_ = 0; + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for containsPypiModulesConflict. + */ + @java.lang.Override + public int getContainsPypiModulesConflictValue() { + return containsPypiModulesConflict_; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for containsPypiModulesConflict to set. + * @return This builder for chaining. + */ + public Builder setContainsPypiModulesConflictValue(int value) { + + containsPypiModulesConflict_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The containsPypiModulesConflict. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + getContainsPypiModulesConflict() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult result = + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + .valueOf(containsPypiModulesConflict_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The containsPypiModulesConflict to set. + * @return This builder for chaining. + */ + public Builder setContainsPypiModulesConflict( + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + value) { + if (value == null) { + throw new NullPointerException(); + } + + containsPypiModulesConflict_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearContainsPypiModulesConflict() { + + containsPypiModulesConflict_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pypiConflictBuildLogExtract_ = ""; + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pypiConflictBuildLogExtract. + */ + public java.lang.String getPypiConflictBuildLogExtract() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pypiConflictBuildLogExtract_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pypiConflictBuildLogExtract. + */ + public com.google.protobuf.ByteString getPypiConflictBuildLogExtractBytes() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pypiConflictBuildLogExtract_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The pypiConflictBuildLogExtract to set. + * @return This builder for chaining. + */ + public Builder setPypiConflictBuildLogExtract(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pypiConflictBuildLogExtract_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPypiConflictBuildLogExtract() { + + pypiConflictBuildLogExtract_ = getDefaultInstance().getPypiConflictBuildLogExtract(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for pypiConflictBuildLogExtract to set. + * @return This builder for chaining. + */ + public Builder setPypiConflictBuildLogExtractBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pypiConflictBuildLogExtract_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageVersion_ = ""; + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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; + } + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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; + } + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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; + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @return This builder for chaining. + */ + public Builder clearImageVersion() { + + imageVersion_ = getDefaultInstance().getImageVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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 pypiDependencies_; + + private com.google.protobuf.MapField + internalGetPypiDependencies() { + if (pypiDependencies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + } + return pypiDependencies_; + } + + private com.google.protobuf.MapField + internalGetMutablePypiDependencies() { + onChanged(); + ; + if (pypiDependencies_ == null) { + pypiDependencies_ = + com.google.protobuf.MapField.newMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + } + if (!pypiDependencies_.isMutable()) { + pypiDependencies_ = pypiDependencies_.copy(); + } + return pypiDependencies_; + } + + public int getPypiDependenciesCount() { + return internalGetPypiDependencies().getMap().size(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public boolean containsPypiDependencies(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiDependencies().getMap().containsKey(key); + } + /** Use {@link #getPypiDependenciesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiDependencies() { + return getPypiDependenciesMap(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.util.Map getPypiDependenciesMap() { + return internalGetPypiDependencies().getMap(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetPypiDependencies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetPypiDependencies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPypiDependencies() { + internalGetMutablePypiDependencies().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + public Builder removePypiDependencies(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiDependencies().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePypiDependencies() { + return internalGetMutablePypiDependencies().getMutableMap(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + public Builder putPypiDependencies(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiDependencies().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + public Builder putAllPypiDependencies( + java.util.Map values) { + internalGetMutablePypiDependencies().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.orchestration.airflow.service.v1.CheckUpgradeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + private static final com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckUpgradeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CheckUpgradeResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CheckUpgradeResponseOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CheckUpgradeResponseOrBuilder.java new file mode 100644 index 00000000..bfc748e4 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CheckUpgradeResponseOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface CheckUpgradeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildLogUri. + */ + java.lang.String getBuildLogUri(); + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildLogUri. + */ + com.google.protobuf.ByteString getBuildLogUriBytes(); + + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for containsPypiModulesConflict. + */ + int getContainsPypiModulesConflictValue(); + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The containsPypiModulesConflict. + */ + com.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + getContainsPypiModulesConflict(); + + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pypiConflictBuildLogExtract. + */ + java.lang.String getPypiConflictBuildLogExtract(); + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pypiConflictBuildLogExtract. + */ + com.google.protobuf.ByteString getPypiConflictBuildLogExtractBytes(); + + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @return The imageVersion. + */ + java.lang.String getImageVersion(); + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @return The bytes for imageVersion. + */ + com.google.protobuf.ByteString getImageVersionBytes(); + + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + int getPypiDependenciesCount(); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + boolean containsPypiDependencies(java.lang.String key); + /** Use {@link #getPypiDependenciesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPypiDependencies(); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + java.util.Map getPypiDependenciesMap(); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + java.lang.String getPypiDependenciesOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + java.lang.String getPypiDependenciesOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CreateEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CreateEnvironmentRequest.java new file mode 100644 index 00000000..63d6aac8 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CreateEnvironmentRequest.java @@ -0,0 +1,953 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Create a new environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} + */ +public final class CreateEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + CreateEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEnvironmentRequest.newBuilder() to construct. + private CreateEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEnvironmentRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEnvironmentRequest( + 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.orchestration.airflow.service.v1.Environment.Builder subBuilder = + null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.Environment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1.Environment environment_; + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + return getEnvironment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (environment_ != null) { + output.writeMessage(2, getEnvironment()); + } + 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 (environment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEnvironment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment().equals(other.getEnvironment())) return false; + } + if (!unknownFields.equals(other.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 (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Create a new environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(this); + result.parent_ = parent_; + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.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.orchestration.airflow.service.v1.CreateEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return environmentBuilder_ != null || environment_ != null; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * + * @return The environment. + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + public Builder mergeEnvironment( + com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.orchestration.airflow.service.v1.Environment.newBuilder(environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment.Builder + getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CreateEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CreateEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..cbc7d533 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/CreateEnvironmentRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface CreateEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * + * @return The environment. + */ + com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment(); + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder getEnvironmentOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseConfig.java new file mode 100644 index 00000000..515c9df5 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseConfig.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The configuration of Cloud SQL instance that is used by the Apache Airflow
+ * software.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DatabaseConfig} + */ +public final class DatabaseConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + DatabaseConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseConfig.newBuilder() to construct. + private DatabaseConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseConfig() { + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DatabaseConfig( + 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(); + + machineType_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.class, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig other = + (com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration of Cloud SQL instance that is used by the Apache Airflow
+   * software.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DatabaseConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.class, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder.class); + } + + // Construct using com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + machineType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig build() { + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig result = + new com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(this); + result.machineType_ = machineType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.getDefaultInstance()) + return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + 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.orchestration.airflow.service.v1.DatabaseConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DatabaseConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseConfigOrBuilder.java new file mode 100644 index 00000000..25483cb0 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DatabaseConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface DatabaseConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DeleteEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DeleteEnvironmentRequest.java new file mode 100644 index 00000000..521e7a00 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DeleteEnvironmentRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Delete an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} + */ +public final class DeleteEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + DeleteEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEnvironmentRequest.newBuilder() to construct. + private DeleteEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteEnvironmentRequest( + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) 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.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Delete an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(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.orchestration.airflow.service.v1.DeleteEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + .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.orchestration.airflow.service.v1.DeleteEnvironmentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DeleteEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DeleteEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..2b488cd7 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/DeleteEnvironmentRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface DeleteEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EncryptionConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EncryptionConfig.java new file mode 100644 index 00000000..3cc1a225 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EncryptionConfig.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The encryption options for the Cloud Composer environment
+ * and its dependencies.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.EncryptionConfig} + */ +public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.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() { + kmsKeyName_ = ""; + } + + @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(); + + kmsKeyName_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.class, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder.class); + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object kmsKeyName_; + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = 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 (!getKmsKeyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKmsKeyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig other = + (com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) obj; + + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!unknownFields.equals(other.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) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.EncryptionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.EncryptionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.EncryptionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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; + } + /** + * + * + *
+   * The encryption options for the Cloud Composer environment
+   * and its dependencies.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.EncryptionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.EncryptionConfig) + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.class, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.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(); + kmsKeyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig build() { + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig result = + new com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(this); + result.kmsKeyName_ = kmsKeyName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + .getDefaultInstance()) return this; + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + 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.orchestration.airflow.service.v1.EncryptionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyName_ = 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.orchestration.airflow.service.v1.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.EncryptionConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.EncryptionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EncryptionConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EncryptionConfigOrBuilder.java new file mode 100644 index 00000000..4e4a6a73 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EncryptionConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface EncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/Environment.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/Environment.java new file mode 100644 index 00000000..de7544fa --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/Environment.java @@ -0,0 +1,2457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * An environment for running orchestration tasks.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.Environment} + */ +public final class Environment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.Environment) + EnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Environment.newBuilder() to construct. + private Environment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Environment() { + name_ = ""; + uuid_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Environment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Environment( + 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: + { + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder + subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + uuid_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + 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 50: + { + 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 58: + { + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.Environment.class, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder.class); + } + + /** + * + * + *
+   * State of the environment.
+   * 
+ * + * Protobuf enum {@code google.cloud.orchestration.airflow.service.v1.Environment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state of the environment is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The environment is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The environment is currently running and healthy. It is ready for use.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The environment is being updated. It remains usable but cannot receive
+     * additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * The environment is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * The environment has encountered an error and cannot be used.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state of the environment is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The environment is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * The environment is currently running and healthy. It is ready for use.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The environment is being updated. It remains usable but cannot receive
+     * additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + * + * + *
+     * The environment is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + * + * + *
+     * The environment has encountered an error and cannot be used.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return RUNNING; + case 3: + return UPDATING; + case 4: + return DELETING; + case 5: + return ERROR; + 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.orchestration.airflow.service.v1.Environment.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.orchestration.airflow.service.v1.Environment.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * 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 CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config_; + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig getConfig() { + return config_ == null + ? com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder + getConfigOrBuilder() { + return getConfig(); + } + + public static final int UUID_FIELD_NUMBER = 3; + private volatile java.lang.Object uuid_; + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.Environment.State result = + com.google.cloud.orchestration.airflow.service.v1.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @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 at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @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 at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_Environment_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. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + @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. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + @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. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + @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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (config_ != null) { + output.writeMessage(2, getConfig()); + } + if (!getUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uuid_); + } + if (state_ + != com.google.cloud.orchestration.airflow.service.v1.Environment.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + 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 (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfig()); + } + if (!getUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uuid_); + } + if (state_ + != com.google.cloud.orchestration.airflow.service.v1.Environment.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, 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(7, 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.orchestration.airflow.service.v1.Environment)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.Environment other = + (com.google.cloud.orchestration.airflow.service.v1.Environment) obj; + + if (!getName().equals(other.getName())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!getUuid().equals(other.getUuid())) return false; + if (state_ != other.state_) 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 (!unknownFields.equals(other.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 (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + 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(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.Environment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An environment for running orchestration tasks.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.Environment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.Environment) + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.Environment.class, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder.class); + } + + // Construct using com.google.cloud.orchestration.airflow.service.v1.Environment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + uuid_ = ""; + + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment build() { + com.google.cloud.orchestration.airflow.service.v1.Environment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.Environment result = + new com.google.cloud.orchestration.airflow.service.v1.Environment(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + result.uuid_ = uuid_; + result.state_ = state_; + 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(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.Environment) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1.Environment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.orchestration.airflow.service.v1.Environment other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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.orchestration.airflow.service.v1.Environment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.Environment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + * + * @return The config. + */ + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + .getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + public Builder setConfig( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + public Builder setConfig( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder + builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + public Builder mergeConfig( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.newBuilder( + config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder + getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder + getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + .getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + + uuid_ = getDefaultInstance().getUuid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uuid_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.Environment.State result = + com.google.cloud.orchestration.airflow.service.v1.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.orchestration.airflow.service.v1.Environment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 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 at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @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 at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + 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 at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + 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 at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + 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 at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + 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 at which this environment was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + 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 at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @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 at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + 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 at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + 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 at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + 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 at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + 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 at which this environment was last modified.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + 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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + @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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + @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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + @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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + 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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + 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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7; + */ + 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.orchestration.airflow.service.v1.Environment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.Environment) + private static final com.google.cloud.orchestration.airflow.service.v1.Environment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.Environment(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.Environment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Environment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Environment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java new file mode 100644 index 00000000..e0489a7a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfig.java @@ -0,0 +1,3336 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Configuration information for an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} + */ +public final class EnvironmentConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + EnvironmentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvironmentConfig.newBuilder() to construct. + private EnvironmentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnvironmentConfig() { + gkeCluster_ = ""; + dagGcsPrefix_ = ""; + airflowUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnvironmentConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnvironmentConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + gkeCluster_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + dagGcsPrefix_ = s; + break; + } + case 24: + { + nodeCount_ = input.readInt32(); + break; + } + case 34: + { + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder subBuilder = + null; + if (softwareConfig_ != null) { + subBuilder = softwareConfig_.toBuilder(); + } + softwareConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(softwareConfig_); + softwareConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder subBuilder = + null; + if (nodeConfig_ != null) { + subBuilder = nodeConfig_.toBuilder(); + } + nodeConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(nodeConfig_); + nodeConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + airflowUri_ = s; + break; + } + case 58: + { + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder + subBuilder = null; + if (privateEnvironmentConfig_ != null) { + subBuilder = privateEnvironmentConfig_.toBuilder(); + } + privateEnvironmentConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(privateEnvironmentConfig_); + privateEnvironmentConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .Builder + subBuilder = null; + if (webServerNetworkAccessControl_ != null) { + subBuilder = webServerNetworkAccessControl_.toBuilder(); + } + webServerNetworkAccessControl_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControl.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webServerNetworkAccessControl_); + webServerNetworkAccessControl_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder subBuilder = + null; + if (databaseConfig_ != null) { + subBuilder = databaseConfig_.toBuilder(); + } + databaseConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(databaseConfig_); + databaseConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder subBuilder = + null; + if (webServerConfig_ != null) { + subBuilder = webServerConfig_.toBuilder(); + } + webServerConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webServerConfig_); + webServerConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder + subBuilder = null; + if (encryptionConfig_ != null) { + subBuilder = encryptionConfig_.toBuilder(); + } + encryptionConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionConfig_); + encryptionConfig_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder.class); + } + + public static final int GKE_CLUSTER_FIELD_NUMBER = 1; + private volatile java.lang.Object gkeCluster_; + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1; + * + * @return The gkeCluster. + */ + @java.lang.Override + public java.lang.String getGkeCluster() { + java.lang.Object ref = gkeCluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeCluster_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1; + * + * @return The bytes for gkeCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGkeClusterBytes() { + java.lang.Object ref = gkeCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DAG_GCS_PREFIX_FIELD_NUMBER = 2; + private volatile java.lang.Object dagGcsPrefix_; + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2; + * + * @return The dagGcsPrefix. + */ + @java.lang.Override + public java.lang.String getDagGcsPrefix() { + java.lang.Object ref = dagGcsPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dagGcsPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2; + * + * @return The bytes for dagGcsPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDagGcsPrefixBytes() { + java.lang.Object ref = dagGcsPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dagGcsPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_COUNT_FIELD_NUMBER = 3; + private int nodeCount_; + /** + * + * + *
+   * The number of nodes in the Kubernetes Engine cluster that will be
+   * used to run this environment.
+   * 
+ * + * int32 node_count = 3; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + + public static final int SOFTWARE_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig softwareConfig_; + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + * @return Whether the softwareConfig field is set. + */ + @java.lang.Override + public boolean hasSoftwareConfig() { + return softwareConfig_ != null; + } + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + * @return The softwareConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig getSoftwareConfig() { + return softwareConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + return getSoftwareConfig(); + } + + public static final int NODE_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.orchestration.airflow.service.v1.NodeConfig nodeConfig_; + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + * + * @return Whether the nodeConfig field is set. + */ + @java.lang.Override + public boolean hasNodeConfig() { + return nodeConfig_ != null; + } + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + * + * @return The nodeConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig getNodeConfig() { + return nodeConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.NodeConfig.getDefaultInstance() + : nodeConfig_; + } + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder + getNodeConfigOrBuilder() { + return getNodeConfig(); + } + + public static final int PRIVATE_ENVIRONMENT_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + privateEnvironmentConfig_; + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return Whether the privateEnvironmentConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateEnvironmentConfig() { + return privateEnvironmentConfig_ != null; + } + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return The privateEnvironmentConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + getPrivateEnvironmentConfig() { + return privateEnvironmentConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + .getDefaultInstance() + : privateEnvironmentConfig_; + } + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfigOrBuilder + getPrivateEnvironmentConfigOrBuilder() { + return getPrivateEnvironmentConfig(); + } + + public static final int WEB_SERVER_NETWORK_ACCESS_CONTROL_FIELD_NUMBER = 8; + private com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + webServerNetworkAccessControl_; + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerNetworkAccessControl field is set. + */ + @java.lang.Override + public boolean hasWebServerNetworkAccessControl() { + return webServerNetworkAccessControl_ != null; + } + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerNetworkAccessControl. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + getWebServerNetworkAccessControl() { + return webServerNetworkAccessControl_ == null + ? com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .getDefaultInstance() + : webServerNetworkAccessControl_; + } + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControlOrBuilder + getWebServerNetworkAccessControlOrBuilder() { + return getWebServerNetworkAccessControl(); + } + + public static final int DATABASE_CONFIG_FIELD_NUMBER = 9; + private com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig databaseConfig_; + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseConfig field is set. + */ + @java.lang.Override + public boolean hasDatabaseConfig() { + return databaseConfig_ != null; + } + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig getDatabaseConfig() { + return databaseConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.getDefaultInstance() + : databaseConfig_; + } + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder + getDatabaseConfigOrBuilder() { + return getDatabaseConfig(); + } + + public static final int WEB_SERVER_CONFIG_FIELD_NUMBER = 10; + private com.google.cloud.orchestration.airflow.service.v1.WebServerConfig webServerConfig_; + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerConfig field is set. + */ + @java.lang.Override + public boolean hasWebServerConfig() { + return webServerConfig_ != null; + } + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig getWebServerConfig() { + return webServerConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.getDefaultInstance() + : webServerConfig_; + } + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder + getWebServerConfigOrBuilder() { + return getWebServerConfig(); + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment
+   * and its dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment
+   * and its dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment
+   * and its dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return getEncryptionConfig(); + } + + public static final int AIRFLOW_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object airflowUri_; + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6; + * + * @return The airflowUri. + */ + @java.lang.Override + public java.lang.String getAirflowUri() { + java.lang.Object ref = airflowUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + airflowUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6; + * + * @return The bytes for airflowUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAirflowUriBytes() { + java.lang.Object ref = airflowUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + airflowUri_ = 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 (!getGkeClusterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gkeCluster_); + } + if (!getDagGcsPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dagGcsPrefix_); + } + if (nodeCount_ != 0) { + output.writeInt32(3, nodeCount_); + } + if (softwareConfig_ != null) { + output.writeMessage(4, getSoftwareConfig()); + } + if (nodeConfig_ != null) { + output.writeMessage(5, getNodeConfig()); + } + if (!getAirflowUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, airflowUri_); + } + if (privateEnvironmentConfig_ != null) { + output.writeMessage(7, getPrivateEnvironmentConfig()); + } + if (webServerNetworkAccessControl_ != null) { + output.writeMessage(8, getWebServerNetworkAccessControl()); + } + if (databaseConfig_ != null) { + output.writeMessage(9, getDatabaseConfig()); + } + if (webServerConfig_ != null) { + output.writeMessage(10, getWebServerConfig()); + } + if (encryptionConfig_ != null) { + output.writeMessage(11, getEncryptionConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGkeClusterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gkeCluster_); + } + if (!getDagGcsPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dagGcsPrefix_); + } + if (nodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, nodeCount_); + } + if (softwareConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSoftwareConfig()); + } + if (nodeConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getNodeConfig()); + } + if (!getAirflowUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, airflowUri_); + } + if (privateEnvironmentConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getPrivateEnvironmentConfig()); + } + if (webServerNetworkAccessControl_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getWebServerNetworkAccessControl()); + } + if (databaseConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDatabaseConfig()); + } + if (webServerConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getWebServerConfig()); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getEncryptionConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig other = + (com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) obj; + + if (!getGkeCluster().equals(other.getGkeCluster())) return false; + if (!getDagGcsPrefix().equals(other.getDagGcsPrefix())) return false; + if (getNodeCount() != other.getNodeCount()) return false; + if (hasSoftwareConfig() != other.hasSoftwareConfig()) return false; + if (hasSoftwareConfig()) { + if (!getSoftwareConfig().equals(other.getSoftwareConfig())) return false; + } + if (hasNodeConfig() != other.hasNodeConfig()) return false; + if (hasNodeConfig()) { + if (!getNodeConfig().equals(other.getNodeConfig())) return false; + } + if (hasPrivateEnvironmentConfig() != other.hasPrivateEnvironmentConfig()) return false; + if (hasPrivateEnvironmentConfig()) { + if (!getPrivateEnvironmentConfig().equals(other.getPrivateEnvironmentConfig())) return false; + } + if (hasWebServerNetworkAccessControl() != other.hasWebServerNetworkAccessControl()) + return false; + if (hasWebServerNetworkAccessControl()) { + if (!getWebServerNetworkAccessControl().equals(other.getWebServerNetworkAccessControl())) + return false; + } + if (hasDatabaseConfig() != other.hasDatabaseConfig()) return false; + if (hasDatabaseConfig()) { + if (!getDatabaseConfig().equals(other.getDatabaseConfig())) return false; + } + if (hasWebServerConfig() != other.hasWebServerConfig()) return false; + if (hasWebServerConfig()) { + if (!getWebServerConfig().equals(other.getWebServerConfig())) return false; + } + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (!getAirflowUri().equals(other.getAirflowUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GKE_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeCluster().hashCode(); + hash = (37 * hash) + DAG_GCS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getDagGcsPrefix().hashCode(); + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNodeCount(); + if (hasSoftwareConfig()) { + hash = (37 * hash) + SOFTWARE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSoftwareConfig().hashCode(); + } + if (hasNodeConfig()) { + hash = (37 * hash) + NODE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNodeConfig().hashCode(); + } + if (hasPrivateEnvironmentConfig()) { + hash = (37 * hash) + PRIVATE_ENVIRONMENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateEnvironmentConfig().hashCode(); + } + if (hasWebServerNetworkAccessControl()) { + hash = (37 * hash) + WEB_SERVER_NETWORK_ACCESS_CONTROL_FIELD_NUMBER; + hash = (53 * hash) + getWebServerNetworkAccessControl().hashCode(); + } + if (hasDatabaseConfig()) { + hash = (37 * hash) + DATABASE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseConfig().hashCode(); + } + if (hasWebServerConfig()) { + hash = (37 * hash) + WEB_SERVER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWebServerConfig().hashCode(); + } + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + hash = (37 * hash) + AIRFLOW_URI_FIELD_NUMBER; + hash = (53 * hash) + getAirflowUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration information for an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + gkeCluster_ = ""; + + dagGcsPrefix_ = ""; + + nodeCount_ = 0; + + if (softwareConfigBuilder_ == null) { + softwareConfig_ = null; + } else { + softwareConfig_ = null; + softwareConfigBuilder_ = null; + } + if (nodeConfigBuilder_ == null) { + nodeConfig_ = null; + } else { + nodeConfig_ = null; + nodeConfigBuilder_ = null; + } + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfig_ = null; + } else { + privateEnvironmentConfig_ = null; + privateEnvironmentConfigBuilder_ = null; + } + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControl_ = null; + } else { + webServerNetworkAccessControl_ = null; + webServerNetworkAccessControlBuilder_ = null; + } + if (databaseConfigBuilder_ == null) { + databaseConfig_ = null; + } else { + databaseConfig_ = null; + databaseConfigBuilder_ = null; + } + if (webServerConfigBuilder_ == null) { + webServerConfig_ = null; + } else { + webServerConfig_ = null; + webServerConfigBuilder_ = null; + } + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + airflowUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig build() { + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig result = + new com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(this); + result.gkeCluster_ = gkeCluster_; + result.dagGcsPrefix_ = dagGcsPrefix_; + result.nodeCount_ = nodeCount_; + if (softwareConfigBuilder_ == null) { + result.softwareConfig_ = softwareConfig_; + } else { + result.softwareConfig_ = softwareConfigBuilder_.build(); + } + if (nodeConfigBuilder_ == null) { + result.nodeConfig_ = nodeConfig_; + } else { + result.nodeConfig_ = nodeConfigBuilder_.build(); + } + if (privateEnvironmentConfigBuilder_ == null) { + result.privateEnvironmentConfig_ = privateEnvironmentConfig_; + } else { + result.privateEnvironmentConfig_ = privateEnvironmentConfigBuilder_.build(); + } + if (webServerNetworkAccessControlBuilder_ == null) { + result.webServerNetworkAccessControl_ = webServerNetworkAccessControl_; + } else { + result.webServerNetworkAccessControl_ = webServerNetworkAccessControlBuilder_.build(); + } + if (databaseConfigBuilder_ == null) { + result.databaseConfig_ = databaseConfig_; + } else { + result.databaseConfig_ = databaseConfigBuilder_.build(); + } + if (webServerConfigBuilder_ == null) { + result.webServerConfig_ = webServerConfig_; + } else { + result.webServerConfig_ = webServerConfigBuilder_.build(); + } + if (encryptionConfigBuilder_ == null) { + result.encryptionConfig_ = encryptionConfig_; + } else { + result.encryptionConfig_ = encryptionConfigBuilder_.build(); + } + result.airflowUri_ = airflowUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + .getDefaultInstance()) return this; + if (!other.getGkeCluster().isEmpty()) { + gkeCluster_ = other.gkeCluster_; + onChanged(); + } + if (!other.getDagGcsPrefix().isEmpty()) { + dagGcsPrefix_ = other.dagGcsPrefix_; + onChanged(); + } + if (other.getNodeCount() != 0) { + setNodeCount(other.getNodeCount()); + } + if (other.hasSoftwareConfig()) { + mergeSoftwareConfig(other.getSoftwareConfig()); + } + if (other.hasNodeConfig()) { + mergeNodeConfig(other.getNodeConfig()); + } + if (other.hasPrivateEnvironmentConfig()) { + mergePrivateEnvironmentConfig(other.getPrivateEnvironmentConfig()); + } + if (other.hasWebServerNetworkAccessControl()) { + mergeWebServerNetworkAccessControl(other.getWebServerNetworkAccessControl()); + } + if (other.hasDatabaseConfig()) { + mergeDatabaseConfig(other.getDatabaseConfig()); + } + if (other.hasWebServerConfig()) { + mergeWebServerConfig(other.getWebServerConfig()); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (!other.getAirflowUri().isEmpty()) { + airflowUri_ = other.airflowUri_; + 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.orchestration.airflow.service.v1.EnvironmentConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gkeCluster_ = ""; + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1; + * + * @return The gkeCluster. + */ + public java.lang.String getGkeCluster() { + java.lang.Object ref = gkeCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1; + * + * @return The bytes for gkeCluster. + */ + public com.google.protobuf.ByteString getGkeClusterBytes() { + java.lang.Object ref = gkeCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1; + * + * @param value The gkeCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gkeCluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1; + * + * @return This builder for chaining. + */ + public Builder clearGkeCluster() { + + gkeCluster_ = getDefaultInstance().getGkeCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1; + * + * @param value The bytes for gkeCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gkeCluster_ = value; + onChanged(); + return this; + } + + private java.lang.Object dagGcsPrefix_ = ""; + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2; + * + * @return The dagGcsPrefix. + */ + public java.lang.String getDagGcsPrefix() { + java.lang.Object ref = dagGcsPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dagGcsPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2; + * + * @return The bytes for dagGcsPrefix. + */ + public com.google.protobuf.ByteString getDagGcsPrefixBytes() { + java.lang.Object ref = dagGcsPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dagGcsPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2; + * + * @param value The dagGcsPrefix to set. + * @return This builder for chaining. + */ + public Builder setDagGcsPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dagGcsPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2; + * + * @return This builder for chaining. + */ + public Builder clearDagGcsPrefix() { + + dagGcsPrefix_ = getDefaultInstance().getDagGcsPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2; + * + * @param value The bytes for dagGcsPrefix to set. + * @return This builder for chaining. + */ + public Builder setDagGcsPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dagGcsPrefix_ = value; + onChanged(); + return this; + } + + private int nodeCount_; + /** + * + * + *
+     * The number of nodes in the Kubernetes Engine cluster that will be
+     * used to run this environment.
+     * 
+ * + * int32 node_count = 3; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + /** + * + * + *
+     * The number of nodes in the Kubernetes Engine cluster that will be
+     * used to run this environment.
+     * 
+ * + * int32 node_count = 3; + * + * @param value The nodeCount to set. + * @return This builder for chaining. + */ + public Builder setNodeCount(int value) { + + nodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of nodes in the Kubernetes Engine cluster that will be
+     * used to run this environment.
+     * 
+ * + * int32 node_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearNodeCount() { + + nodeCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig softwareConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder> + softwareConfigBuilder_; + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + * + * @return Whether the softwareConfig field is set. + */ + public boolean hasSoftwareConfig() { + return softwareConfigBuilder_ != null || softwareConfig_ != null; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + * + * @return The softwareConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig getSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + return softwareConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.getDefaultInstance() + : softwareConfig_; + } else { + return softwareConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + public Builder setSoftwareConfig( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softwareConfig_ = value; + onChanged(); + } else { + softwareConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + public Builder setSoftwareConfig( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder builderForValue) { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = builderForValue.build(); + onChanged(); + } else { + softwareConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + public Builder mergeSoftwareConfig( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (softwareConfig_ != null) { + softwareConfig_ = + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.newBuilder( + softwareConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + softwareConfig_ = value; + } + onChanged(); + } else { + softwareConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + public Builder clearSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = null; + onChanged(); + } else { + softwareConfig_ = null; + softwareConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder + getSoftwareConfigBuilder() { + + onChanged(); + return getSoftwareConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + if (softwareConfigBuilder_ != null) { + return softwareConfigBuilder_.getMessageOrBuilder(); + } else { + return softwareConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder> + getSoftwareConfigFieldBuilder() { + if (softwareConfigBuilder_ == null) { + softwareConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder>( + getSoftwareConfig(), getParentForChildren(), isClean()); + softwareConfig_ = null; + } + return softwareConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1.NodeConfig nodeConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.NodeConfig, + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder> + nodeConfigBuilder_; + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + * + * @return Whether the nodeConfig field is set. + */ + public boolean hasNodeConfig() { + return nodeConfigBuilder_ != null || nodeConfig_ != null; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + * + * @return The nodeConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig getNodeConfig() { + if (nodeConfigBuilder_ == null) { + return nodeConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.NodeConfig.getDefaultInstance() + : nodeConfig_; + } else { + return nodeConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + public Builder setNodeConfig( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig value) { + if (nodeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeConfig_ = value; + onChanged(); + } else { + nodeConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + public Builder setNodeConfig( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder builderForValue) { + if (nodeConfigBuilder_ == null) { + nodeConfig_ = builderForValue.build(); + onChanged(); + } else { + nodeConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + public Builder mergeNodeConfig( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig value) { + if (nodeConfigBuilder_ == null) { + if (nodeConfig_ != null) { + nodeConfig_ = + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.newBuilder(nodeConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + nodeConfig_ = value; + } + onChanged(); + } else { + nodeConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + public Builder clearNodeConfig() { + if (nodeConfigBuilder_ == null) { + nodeConfig_ = null; + onChanged(); + } else { + nodeConfig_ = null; + nodeConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder + getNodeConfigBuilder() { + + onChanged(); + return getNodeConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + public com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder + getNodeConfigOrBuilder() { + if (nodeConfigBuilder_ != null) { + return nodeConfigBuilder_.getMessageOrBuilder(); + } else { + return nodeConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.NodeConfig.getDefaultInstance() + : nodeConfig_; + } + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.NodeConfig, + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder> + getNodeConfigFieldBuilder() { + if (nodeConfigBuilder_ == null) { + nodeConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.NodeConfig, + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder>( + getNodeConfig(), getParentForChildren(), isClean()); + nodeConfig_ = null; + } + return nodeConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + privateEnvironmentConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfigOrBuilder> + privateEnvironmentConfigBuilder_; + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return Whether the privateEnvironmentConfig field is set. + */ + public boolean hasPrivateEnvironmentConfig() { + return privateEnvironmentConfigBuilder_ != null || privateEnvironmentConfig_ != null; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return The privateEnvironmentConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + getPrivateEnvironmentConfig() { + if (privateEnvironmentConfigBuilder_ == null) { + return privateEnvironmentConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + .getDefaultInstance() + : privateEnvironmentConfig_; + } else { + return privateEnvironmentConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder setPrivateEnvironmentConfig( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig value) { + if (privateEnvironmentConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateEnvironmentConfig_ = value; + onChanged(); + } else { + privateEnvironmentConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder setPrivateEnvironmentConfig( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder + builderForValue) { + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfig_ = builderForValue.build(); + onChanged(); + } else { + privateEnvironmentConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder mergePrivateEnvironmentConfig( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig value) { + if (privateEnvironmentConfigBuilder_ == null) { + if (privateEnvironmentConfig_ != null) { + privateEnvironmentConfig_ = + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.newBuilder( + privateEnvironmentConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + privateEnvironmentConfig_ = value; + } + onChanged(); + } else { + privateEnvironmentConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder clearPrivateEnvironmentConfig() { + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfig_ = null; + onChanged(); + } else { + privateEnvironmentConfig_ = null; + privateEnvironmentConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder + getPrivateEnvironmentConfigBuilder() { + + onChanged(); + return getPrivateEnvironmentConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfigOrBuilder + getPrivateEnvironmentConfigOrBuilder() { + if (privateEnvironmentConfigBuilder_ != null) { + return privateEnvironmentConfigBuilder_.getMessageOrBuilder(); + } else { + return privateEnvironmentConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + .getDefaultInstance() + : privateEnvironmentConfig_; + } + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfigOrBuilder> + getPrivateEnvironmentConfigFieldBuilder() { + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1 + .PrivateEnvironmentConfigOrBuilder>( + getPrivateEnvironmentConfig(), getParentForChildren(), isClean()); + privateEnvironmentConfig_ = null; + } + return privateEnvironmentConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + webServerNetworkAccessControl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.Builder, + com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControlOrBuilder> + webServerNetworkAccessControlBuilder_; + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerNetworkAccessControl field is set. + */ + public boolean hasWebServerNetworkAccessControl() { + return webServerNetworkAccessControlBuilder_ != null + || webServerNetworkAccessControl_ != null; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerNetworkAccessControl. + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + getWebServerNetworkAccessControl() { + if (webServerNetworkAccessControlBuilder_ == null) { + return webServerNetworkAccessControl_ == null + ? com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .getDefaultInstance() + : webServerNetworkAccessControl_; + } else { + return webServerNetworkAccessControlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerNetworkAccessControl( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl value) { + if (webServerNetworkAccessControlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webServerNetworkAccessControl_ = value; + onChanged(); + } else { + webServerNetworkAccessControlBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerNetworkAccessControl( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.Builder + builderForValue) { + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControl_ = builderForValue.build(); + onChanged(); + } else { + webServerNetworkAccessControlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWebServerNetworkAccessControl( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl value) { + if (webServerNetworkAccessControlBuilder_ == null) { + if (webServerNetworkAccessControl_ != null) { + webServerNetworkAccessControl_ = + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .newBuilder(webServerNetworkAccessControl_) + .mergeFrom(value) + .buildPartial(); + } else { + webServerNetworkAccessControl_ = value; + } + onChanged(); + } else { + webServerNetworkAccessControlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWebServerNetworkAccessControl() { + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControl_ = null; + onChanged(); + } else { + webServerNetworkAccessControl_ = null; + webServerNetworkAccessControlBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.Builder + getWebServerNetworkAccessControlBuilder() { + + onChanged(); + return getWebServerNetworkAccessControlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControlOrBuilder + getWebServerNetworkAccessControlOrBuilder() { + if (webServerNetworkAccessControlBuilder_ != null) { + return webServerNetworkAccessControlBuilder_.getMessageOrBuilder(); + } else { + return webServerNetworkAccessControl_ == null + ? com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .getDefaultInstance() + : webServerNetworkAccessControl_; + } + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.Builder, + com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControlOrBuilder> + getWebServerNetworkAccessControlFieldBuilder() { + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .Builder, + com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControlOrBuilder>( + getWebServerNetworkAccessControl(), getParentForChildren(), isClean()); + webServerNetworkAccessControl_ = null; + } + return webServerNetworkAccessControlBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig databaseConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder> + databaseConfigBuilder_; + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseConfig field is set. + */ + public boolean hasDatabaseConfig() { + return databaseConfigBuilder_ != null || databaseConfig_ != null; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig getDatabaseConfig() { + if (databaseConfigBuilder_ == null) { + return databaseConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.getDefaultInstance() + : databaseConfig_; + } else { + return databaseConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatabaseConfig( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig value) { + if (databaseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + databaseConfig_ = value; + onChanged(); + } else { + databaseConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatabaseConfig( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder builderForValue) { + if (databaseConfigBuilder_ == null) { + databaseConfig_ = builderForValue.build(); + onChanged(); + } else { + databaseConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDatabaseConfig( + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig value) { + if (databaseConfigBuilder_ == null) { + if (databaseConfig_ != null) { + databaseConfig_ = + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.newBuilder( + databaseConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + databaseConfig_ = value; + } + onChanged(); + } else { + databaseConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDatabaseConfig() { + if (databaseConfigBuilder_ == null) { + databaseConfig_ = null; + onChanged(); + } else { + databaseConfig_ = null; + databaseConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder + getDatabaseConfigBuilder() { + + onChanged(); + return getDatabaseConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder + getDatabaseConfigOrBuilder() { + if (databaseConfigBuilder_ != null) { + return databaseConfigBuilder_.getMessageOrBuilder(); + } else { + return databaseConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.getDefaultInstance() + : databaseConfig_; + } + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder> + getDatabaseConfigFieldBuilder() { + if (databaseConfigBuilder_ == null) { + databaseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder>( + getDatabaseConfig(), getParentForChildren(), isClean()); + databaseConfig_ = null; + } + return databaseConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1.WebServerConfig webServerConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder> + webServerConfigBuilder_; + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerConfig field is set. + */ + public boolean hasWebServerConfig() { + return webServerConfigBuilder_ != null || webServerConfig_ != null; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig getWebServerConfig() { + if (webServerConfigBuilder_ == null) { + return webServerConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.getDefaultInstance() + : webServerConfig_; + } else { + return webServerConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerConfig( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig value) { + if (webServerConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webServerConfig_ = value; + onChanged(); + } else { + webServerConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerConfig( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder builderForValue) { + if (webServerConfigBuilder_ == null) { + webServerConfig_ = builderForValue.build(); + onChanged(); + } else { + webServerConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWebServerConfig( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig value) { + if (webServerConfigBuilder_ == null) { + if (webServerConfig_ != null) { + webServerConfig_ = + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.newBuilder( + webServerConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + webServerConfig_ = value; + } + onChanged(); + } else { + webServerConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWebServerConfig() { + if (webServerConfigBuilder_ == null) { + webServerConfig_ = null; + onChanged(); + } else { + webServerConfig_ = null; + webServerConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder + getWebServerConfigBuilder() { + + onChanged(); + return getWebServerConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder + getWebServerConfigOrBuilder() { + if (webServerConfigBuilder_ != null) { + return webServerConfigBuilder_.getMessageOrBuilder(); + } else { + return webServerConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.getDefaultInstance() + : webServerConfig_; + } + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder> + getWebServerConfigFieldBuilder() { + if (webServerConfigBuilder_ == null) { + webServerConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder>( + getWebServerConfig(), getParentForChildren(), isClean()); + webServerConfig_ = null; + } + return webServerConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return encryptionConfigBuilder_ != null || encryptionConfig_ != null; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + .getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder + builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig( + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (encryptionConfig_ != null) { + encryptionConfig_ = + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.newBuilder( + encryptionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionConfig_ = value; + } + onChanged(); + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + onChanged(); + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig + .getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment
+     * and its dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private java.lang.Object airflowUri_ = ""; + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6; + * + * @return The airflowUri. + */ + public java.lang.String getAirflowUri() { + java.lang.Object ref = airflowUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + airflowUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6; + * + * @return The bytes for airflowUri. + */ + public com.google.protobuf.ByteString getAirflowUriBytes() { + java.lang.Object ref = airflowUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + airflowUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6; + * + * @param value The airflowUri to set. + * @return This builder for chaining. + */ + public Builder setAirflowUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + airflowUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6; + * + * @return This builder for chaining. + */ + public Builder clearAirflowUri() { + + airflowUri_ = getDefaultInstance().getAirflowUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6; + * + * @param value The bytes for airflowUri to set. + * @return This builder for chaining. + */ + public Builder setAirflowUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + airflowUri_ = 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.orchestration.airflow.service.v1.EnvironmentConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvironmentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnvironmentConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java new file mode 100644 index 00000000..8bb4646b --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentConfigOrBuilder.java @@ -0,0 +1,416 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface EnvironmentConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1; + * + * @return The gkeCluster. + */ + java.lang.String getGkeCluster(); + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1; + * + * @return The bytes for gkeCluster. + */ + com.google.protobuf.ByteString getGkeClusterBytes(); + + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2; + * + * @return The dagGcsPrefix. + */ + java.lang.String getDagGcsPrefix(); + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2; + * + * @return The bytes for dagGcsPrefix. + */ + com.google.protobuf.ByteString getDagGcsPrefixBytes(); + + /** + * + * + *
+   * The number of nodes in the Kubernetes Engine cluster that will be
+   * used to run this environment.
+   * 
+ * + * int32 node_count = 3; + * + * @return The nodeCount. + */ + int getNodeCount(); + + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + * @return Whether the softwareConfig field is set. + */ + boolean hasSoftwareConfig(); + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + * + * @return The softwareConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig getSoftwareConfig(); + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4; + */ + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder + getSoftwareConfigOrBuilder(); + + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + * + * @return Whether the nodeConfig field is set. + */ + boolean hasNodeConfig(); + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + * + * @return The nodeConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.NodeConfig getNodeConfig(); + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5; + */ + com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder getNodeConfigOrBuilder(); + + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return Whether the privateEnvironmentConfig field is set. + */ + boolean hasPrivateEnvironmentConfig(); + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return The privateEnvironmentConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + getPrivateEnvironmentConfig(); + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfigOrBuilder + getPrivateEnvironmentConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerNetworkAccessControl field is set. + */ + boolean hasWebServerNetworkAccessControl(); + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerNetworkAccessControl. + */ + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + getWebServerNetworkAccessControl(); + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControlOrBuilder + getWebServerNetworkAccessControlOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseConfig field is set. + */ + boolean hasDatabaseConfig(); + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfig getDatabaseConfig(); + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1.DatabaseConfigOrBuilder + getDatabaseConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerConfig field is set. + */ + boolean hasWebServerConfig(); + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig getWebServerConfig(); + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder + getWebServerConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment
+   * and its dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment
+   * and its dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment
+   * and its dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6; + * + * @return The airflowUri. + */ + java.lang.String getAirflowUri(); + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6; + * + * @return The bytes for airflowUri. + */ + com.google.protobuf.ByteString getAirflowUriBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java new file mode 100644 index 00000000..0ec1146e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EnvironmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ENVIRONMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/environments/{environment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String environment; + + @Deprecated + protected EnvironmentName() { + project = null; + location = null; + environment = null; + } + + private EnvironmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EnvironmentName of(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build(); + } + + public static String format(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build() + .toString(); + } + + public static EnvironmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENVIRONMENT.validatedMatch( + formattedString, "EnvironmentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("environment")); + } + + 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 (EnvironmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENVIRONMENT.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 (environment != null) { + fieldMapBuilder.put("environment", environment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENVIRONMENT.instantiate( + "project", project, "location", location, "environment", environment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EnvironmentName that = ((EnvironmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.environment, that.environment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(environment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/environments/{environment}. */ + public static class Builder { + private String project; + private String location; + private String environment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + private Builder(EnvironmentName environmentName) { + this.project = environmentName.project; + this.location = environmentName.location; + this.environment = environmentName.environment; + } + + public EnvironmentName build() { + return new EnvironmentName(this); + } + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentOrBuilder.java new file mode 100644 index 00000000..58194e22 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentOrBuilder.java @@ -0,0 +1,297 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface EnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.Environment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + * + * @return The config. + */ + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig getConfig(); + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2; + */ + com.google.cloud.orchestration.airflow.service.v1.EnvironmentConfigOrBuilder getConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * + * @return The state. + */ + com.google.cloud.orchestration.airflow.service.v1.Environment.State getState(); + + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java new file mode 100644 index 00000000..9ccfc590 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/EnvironmentsOuterClass.java @@ -0,0 +1,569 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public final class EnvironmentsOuterClass { + private EnvironmentsOuterClass() {} + + 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_orchestration_airflow_service_v1_CreateEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_AirflowConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_PypiPackagesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_PypiPackagesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_EnvVariablesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_EnvVariablesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_PypiDependenciesEntry_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/orchestration/airflow/ser" + + "vice/v1/environments.proto\022-google.cloud" + + ".orchestration.airflow.service.v1\032\034googl" + + "e/api/annotations.proto\032\027google/api/clie" + + "nt.proto\032\037google/api/field_behavior.prot" + + "o\032\031google/api/resource.proto\032#google/lon" + + "grunning/operations.proto\032 google/protob" + + "uf/field_mask.proto\032\037google/protobuf/tim" + + "estamp.proto\"{\n\030CreateEnvironmentRequest" + + "\022\016\n\006parent\030\001 \001(\t\022O\n\013environment\030\002 \001(\0132:." + + "google.cloud.orchestration.airflow.servi" + + "ce.v1.Environment\"%\n\025GetEnvironmentReque" + + "st\022\014\n\004name\030\001 \001(\t\"P\n\027ListEnvironmentsRequ" + + "est\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022" + + "\n\npage_token\030\003 \001(\t\"\205\001\n\030ListEnvironmentsR" + + "esponse\022P\n\014environments\030\001 \003(\0132:.google.c" + + "loud.orchestration.airflow.service.v1.En" + + "vironment\022\027\n\017next_page_token\030\002 \001(\t\"(\n\030De" + + "leteEnvironmentRequest\022\014\n\004name\030\001 \001(\t\"\252\001\n" + + "\030UpdateEnvironmentRequest\022\014\n\004name\030\002 \001(\t\022" + + "O\n\013environment\030\001 \001(\0132:.google.cloud.orch" + + "estration.airflow.service.v1.Environment" + + "\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf." + + "FieldMask\"\232\006\n\021EnvironmentConfig\022\023\n\013gke_c" + + "luster\030\001 \001(\t\022\026\n\016dag_gcs_prefix\030\002 \001(\t\022\022\n\n" + + "node_count\030\003 \001(\005\022V\n\017software_config\030\004 \001(" + + "\0132=.google.cloud.orchestration.airflow.s" + + "ervice.v1.SoftwareConfig\022N\n\013node_config\030" + + "\005 \001(\01329.google.cloud.orchestration.airfl" + + "ow.service.v1.NodeConfig\022k\n\032private_envi" + + "ronment_config\030\007 \001(\0132G.google.cloud.orch" + + "estration.airflow.service.v1.PrivateEnvi" + + "ronmentConfig\022|\n!web_server_network_acce" + + "ss_control\030\010 \001(\0132L.google.cloud.orchestr" + + "ation.airflow.service.v1.WebServerNetwor" + + "kAccessControlB\003\340A\001\022[\n\017database_config\030\t" + + " \001(\0132=.google.cloud.orchestration.airflo" + + "w.service.v1.DatabaseConfigB\003\340A\001\022^\n\021web_" + + "server_config\030\n \001(\0132>.google.cloud.orche" + + "stration.airflow.service.v1.WebServerCon" + + "figB\003\340A\001\022_\n\021encryption_config\030\013 \001(\0132?.go" + + "ogle.cloud.orchestration.airflow.service" + + ".v1.EncryptionConfigB\003\340A\001\022\023\n\013airflow_uri" + + "\030\006 \001(\t\"\322\001\n\035WebServerNetworkAccessControl" + + "\022v\n\021allowed_ip_ranges\030\001 \003(\0132[.google.clo" + + "ud.orchestration.airflow.service.v1.WebS" + + "erverNetworkAccessControl.AllowedIpRange" + + "\0329\n\016AllowedIpRange\022\r\n\005value\030\001 \001(\t\022\030\n\013des" + + "cription\030\002 \001(\tB\003\340A\001\"+\n\016DatabaseConfig\022\031\n" + + "\014machine_type\030\001 \001(\tB\003\340A\001\",\n\017WebServerCon" + + "fig\022\031\n\014machine_type\030\001 \001(\tB\003\340A\001\"-\n\020Encryp" + + "tionConfig\022\031\n\014kms_key_name\030\001 \001(\tB\003\340A\001\"\265\004" + + "\n\016SoftwareConfig\022\025\n\rimage_version\030\001 \001(\t\022" + + "{\n\030airflow_config_overrides\030\002 \003(\0132Y.goog" + + "le.cloud.orchestration.airflow.service.v" + + "1.SoftwareConfig.AirflowConfigOverridesE" + + "ntry\022f\n\rpypi_packages\030\003 \003(\0132O.google.clo" + + "ud.orchestration.airflow.service.v1.Soft" + + "wareConfig.PypiPackagesEntry\022f\n\renv_vari" + + "ables\030\004 \003(\0132O.google.cloud.orchestration" + + ".airflow.service.v1.SoftwareConfig.EnvVa" + + "riablesEntry\022\026\n\016python_version\030\006 \001(\t\032=\n\033" + + "AirflowConfigOverridesEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021PypiPackagesEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021EnvV" + + "ariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\"\220\002\n\022IPAllocationPolicy\022\033\n\016use_ip_a" + + "liases\030\001 \001(\010B\003\340A\001\022+\n\034cluster_secondary_r" + + "ange_name\030\002 \001(\tB\003\340A\001H\000\022&\n\027cluster_ipv4_c" + + "idr_block\030\004 \001(\tB\003\340A\001H\000\022,\n\035services_secon" + + "dary_range_name\030\003 \001(\tB\003\340A\001H\001\022\'\n\030services" + + "_ipv4_cidr_block\030\005 \001(\tB\003\340A\001H\001B\027\n\025cluster" + + "_ip_allocationB\030\n\026services_ip_allocation" + + "\"\222\002\n\nNodeConfig\022\020\n\010location\030\001 \001(\t\022\024\n\014mac" + + "hine_type\030\002 \001(\t\022\017\n\007network\030\003 \001(\t\022\022\n\nsubn" + + "etwork\030\004 \001(\t\022\024\n\014disk_size_gb\030\005 \001(\005\022\024\n\014oa" + + "uth_scopes\030\006 \003(\t\022\027\n\017service_account\030\007 \001(" + + "\t\022\014\n\004tags\030\010 \003(\t\022d\n\024ip_allocation_policy\030" + + "\t \001(\0132A.google.cloud.orchestration.airfl" + + "ow.service.v1.IPAllocationPolicyB\003\340A\001\"\212\001" + + "\n\024PrivateClusterConfig\022$\n\027enable_private" + + "_endpoint\030\001 \001(\010B\003\340A\001\022#\n\026master_ipv4_cidr" + + "_block\030\002 \001(\tB\003\340A\001\022\'\n\032master_ipv4_reserve" + + "d_range\030\003 \001(\tB\003\340A\003\"\253\002\n\030PrivateEnvironmen" + + "tConfig\022\'\n\032enable_private_environment\030\001 " + + "\001(\010B\003\340A\001\022h\n\026private_cluster_config\030\002 \001(\013" + + "2C.google.cloud.orchestration.airflow.se" + + "rvice.v1.PrivateClusterConfigB\003\340A\001\022\'\n\032we" + + "b_server_ipv4_cidr_block\030\003 \001(\tB\003\340A\001\022&\n\031c" + + "loud_sql_ipv4_cidr_block\030\004 \001(\tB\003\340A\001\022+\n\036w" + + "eb_server_ipv4_reserved_range\030\005 \001(\tB\003\340A\003" + + "\"\205\005\n\013Environment\022\014\n\004name\030\001 \001(\t\022P\n\006config" + + "\030\002 \001(\0132@.google.cloud.orchestration.airf" + + "low.service.v1.EnvironmentConfig\022\014\n\004uuid" + + "\030\003 \001(\t\022O\n\005state\030\004 \001(\0162@.google.cloud.orc" + + "hestration.airflow.service.v1.Environmen" + + "t.State\022/\n\013create_time\030\005 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022/\n\013update_time\030\006 \001(\0132\032." + + "google.protobuf.Timestamp\022V\n\006labels\030\007 \003(" + + "\0132F.google.cloud.orchestration.airflow.s" + + "ervice.v1.Environment.LabelsEntry\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + "\"`\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREA" + + "TING\020\001\022\013\n\007RUNNING\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DEL" + + "ETING\020\004\022\t\n\005ERROR\020\005:l\352Ai\n#composer.google" + + "apis.com/Environment\022Bprojects/{project}" + + "/locations/{location}/environments/{envi" + + "ronment}\"\371\003\n\024CheckUpgradeResponse\022\032\n\rbui" + + "ld_log_uri\030\001 \001(\tB\003\340A\003\022\177\n\036contains_pypi_m" + + "odules_conflict\030\004 \001(\0162R.google.cloud.orc" + + "hestration.airflow.service.v1.CheckUpgra" + + "deResponse.ConflictResultB\003\340A\003\022,\n\037pypi_c" + + "onflict_build_log_extract\030\003 \001(\tB\003\340A\003\022\025\n\r" + + "image_version\030\005 \001(\t\022t\n\021pypi_dependencies" + + "\030\006 \003(\0132Y.google.cloud.orchestration.airf" + + "low.service.v1.CheckUpgradeResponse.Pypi" + + "DependenciesEntry\0327\n\025PypiDependenciesEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"P\n\016Co" + + "nflictResult\022\037\n\033CONFLICT_RESULT_UNSPECIF" + + "IED\020\000\022\014\n\010CONFLICT\020\001\022\017\n\013NO_CONFLICT\020\0022\227\013\n" + + "\014Environments\022\251\002\n\021CreateEnvironment\022G.go" + + "ogle.cloud.orchestration.airflow.service" + + ".v1.CreateEnvironmentRequest\032\035.google.lo" + + "ngrunning.Operation\"\253\001\202\323\344\223\002?\"0/v1/{paren" + + "t=projects/*/locations/*}/environments:\013" + + "environment\332A\022parent,environment\312AN\n\013Env" + + "ironment\022?google.cloud.orchestration.air" + + "flow.service.v1.OperationMetadata\022\323\001\n\016Ge" + + "tEnvironment\022D.google.cloud.orchestratio" + + "n.airflow.service.v1.GetEnvironmentReque" + + "st\032:.google.cloud.orchestration.airflow." + + "service.v1.Environment\"?\202\323\344\223\0022\0220/v1/{nam" + + "e=projects/*/locations/*/environments/*}" + + "\332A\004name\022\346\001\n\020ListEnvironments\022F.google.cl" + + "oud.orchestration.airflow.service.v1.Lis" + + "tEnvironmentsRequest\032G.google.cloud.orch" + + "estration.airflow.service.v1.ListEnviron" + + "mentsResponse\"A\202\323\344\223\0022\0220/v1/{parent=proje" + + "cts/*/locations/*}/environments\332A\006parent" + + "\022\263\002\n\021UpdateEnvironment\022G.google.cloud.or" + + "chestration.airflow.service.v1.UpdateEnv" + + "ironmentRequest\032\035.google.longrunning.Ope" + + "ration\"\265\001\202\323\344\223\002?20/v1/{name=projects/*/lo" + + "cations/*/environments/*}:\013environment\332A" + + "\034name,environment,update_mask\312AN\n\013Enviro" + + "nment\022?google.cloud.orchestration.airflo" + + "w.service.v1.OperationMetadata\022\230\002\n\021Delet" + + "eEnvironment\022G.google.cloud.orchestratio" + + "n.airflow.service.v1.DeleteEnvironmentRe" + + "quest\032\035.google.longrunning.Operation\"\232\001\202" + + "\323\344\223\0022*0/v1/{name=projects/*/locations/*/" + + "environments/*}\332A\004name\312AX\n\025google.protob" + + "uf.Empty\022?google.cloud.orchestration.air" + + "flow.service.v1.OperationMetadata\032K\312A\027co" + + "mposer.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformB\213\001\n1com.g" + + "oogle.cloud.orchestration.airflow.servic" + + "e.v1P\001ZTgoogle.golang.org/genproto/googl" + + "eapis/cloud/orchestration/airflow/servic" + + "e/v1;serviceb\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.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_CreateEnvironmentRequest_descriptor, + new java.lang.String[] { + "Parent", "Environment", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_descriptor, + new java.lang.String[] { + "Environments", "NextPageToken", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_DeleteEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", "Environment", "UpdateMask", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_EnvironmentConfig_descriptor, + new java.lang.String[] { + "GkeCluster", + "DagGcsPrefix", + "NodeCount", + "SoftwareConfig", + "NodeConfig", + "PrivateEnvironmentConfig", + "WebServerNetworkAccessControl", + "DatabaseConfig", + "WebServerConfig", + "EncryptionConfig", + "AirflowUri", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor, + new java.lang.String[] { + "AllowedIpRanges", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_descriptor, + new java.lang.String[] { + "Value", "Description", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_DatabaseConfig_descriptor, + new java.lang.String[] { + "MachineType", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor, + new java.lang.String[] { + "MachineType", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_EncryptionConfig_descriptor, + new java.lang.String[] { + "KmsKeyName", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor, + new java.lang.String[] { + "ImageVersion", + "AirflowConfigOverrides", + "PypiPackages", + "EnvVariables", + "PythonVersion", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_AirflowConfigOverridesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_PypiPackagesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_PypiPackagesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_PypiPackagesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_EnvVariablesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_EnvVariablesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_EnvVariablesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor, + new java.lang.String[] { + "UseIpAliases", + "ClusterSecondaryRangeName", + "ClusterIpv4CidrBlock", + "ServicesSecondaryRangeName", + "ServicesIpv4CidrBlock", + "ClusterIpAllocation", + "ServicesIpAllocation", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor, + new java.lang.String[] { + "Location", + "MachineType", + "Network", + "Subnetwork", + "DiskSizeGb", + "OauthScopes", + "ServiceAccount", + "Tags", + "IpAllocationPolicy", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor, + new java.lang.String[] { + "EnablePrivateEndpoint", "MasterIpv4CidrBlock", "MasterIpv4ReservedRange", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor, + new java.lang.String[] { + "EnablePrivateEnvironment", + "PrivateClusterConfig", + "WebServerIpv4CidrBlock", + "CloudSqlIpv4CidrBlock", + "WebServerIpv4ReservedRange", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor, + new java.lang.String[] { + "Name", "Config", "Uuid", "State", "CreateTime", "UpdateTime", "Labels", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_LabelsEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_Environment_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor, + new java.lang.String[] { + "BuildLogUri", + "ContainsPypiModulesConflict", + "PypiConflictBuildLogExtract", + "ImageVersion", + "PypiDependencies", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_PypiDependenciesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.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.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/GetEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/GetEnvironmentRequest.java new file mode 100644 index 00000000..54ba8b80 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/GetEnvironmentRequest.java @@ -0,0 +1,659 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Get an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} + */ +public final class GetEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + GetEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEnvironmentRequest.newBuilder() to construct. + private GetEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEnvironmentRequest( + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) 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.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Get an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(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.orchestration.airflow.service.v1.GetEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + .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.orchestration.airflow.service.v1.GetEnvironmentRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/GetEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/GetEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..8bc6f82e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/GetEnvironmentRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface GetEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/IPAllocationPolicy.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/IPAllocationPolicy.java new file mode 100644 index 00000000..c19f3750 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/IPAllocationPolicy.java @@ -0,0 +1,1891 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Configuration for controlling how IPs are allocated in the
+ * GKE cluster running the Apache Airflow software.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} + */ +public final class IPAllocationPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + IPAllocationPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use IPAllocationPolicy.newBuilder() to construct. + private IPAllocationPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IPAllocationPolicy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IPAllocationPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IPAllocationPolicy( + 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: + { + useIpAliases_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + clusterIpAllocationCase_ = 2; + clusterIpAllocation_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + servicesIpAllocationCase_ = 3; + servicesIpAllocation_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + clusterIpAllocationCase_ = 4; + clusterIpAllocation_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + servicesIpAllocationCase_ = 5; + servicesIpAllocation_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.class, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder.class); + } + + private int clusterIpAllocationCase_ = 0; + private java.lang.Object clusterIpAllocation_; + + public enum ClusterIpAllocationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLUSTER_SECONDARY_RANGE_NAME(2), + CLUSTER_IPV4_CIDR_BLOCK(4), + CLUSTERIPALLOCATION_NOT_SET(0); + private final int value; + + private ClusterIpAllocationCase(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 ClusterIpAllocationCase valueOf(int value) { + return forNumber(value); + } + + public static ClusterIpAllocationCase forNumber(int value) { + switch (value) { + case 2: + return CLUSTER_SECONDARY_RANGE_NAME; + case 4: + return CLUSTER_IPV4_CIDR_BLOCK; + case 0: + return CLUSTERIPALLOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ClusterIpAllocationCase getClusterIpAllocationCase() { + return ClusterIpAllocationCase.forNumber(clusterIpAllocationCase_); + } + + private int servicesIpAllocationCase_ = 0; + private java.lang.Object servicesIpAllocation_; + + public enum ServicesIpAllocationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + SERVICES_SECONDARY_RANGE_NAME(3), + SERVICES_IPV4_CIDR_BLOCK(5), + SERVICESIPALLOCATION_NOT_SET(0); + private final int value; + + private ServicesIpAllocationCase(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 ServicesIpAllocationCase valueOf(int value) { + return forNumber(value); + } + + public static ServicesIpAllocationCase forNumber(int value) { + switch (value) { + case 3: + return SERVICES_SECONDARY_RANGE_NAME; + case 5: + return SERVICES_IPV4_CIDR_BLOCK; + case 0: + return SERVICESIPALLOCATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ServicesIpAllocationCase getServicesIpAllocationCase() { + return ServicesIpAllocationCase.forNumber(servicesIpAllocationCase_); + } + + public static final int USE_IP_ALIASES_FIELD_NUMBER = 1; + private boolean useIpAliases_; + /** + * + * + *
+   * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+   * If `true`, a VPC-native cluster is created.
+   * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useIpAliases. + */ + @java.lang.Override + public boolean getUseIpAliases() { + return useIpAliases_; + } + + public static final int CLUSTER_SECONDARY_RANGE_NAME_FIELD_NUMBER = 2; + /** + * + * + *
+   * Optional. The name of the GKE cluster's secondary range used to allocate
+   * IP addresses to pods.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clusterSecondaryRangeName field is set. + */ + public boolean hasClusterSecondaryRangeName() { + return clusterIpAllocationCase_ == 2; + } + /** + * + * + *
+   * Optional. The name of the GKE cluster's secondary range used to allocate
+   * IP addresses to pods.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterSecondaryRangeName. + */ + public java.lang.String getClusterSecondaryRangeName() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 2) { + ref = clusterIpAllocation_; + } + if (ref instanceof java.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 (clusterIpAllocationCase_ == 2) { + clusterIpAllocation_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The name of the GKE cluster's secondary range used to allocate
+   * IP addresses to pods.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterSecondaryRangeName. + */ + public com.google.protobuf.ByteString getClusterSecondaryRangeNameBytes() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 2) { + ref = clusterIpAllocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (clusterIpAllocationCase_ == 2) { + clusterIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_IPV4_CIDR_BLOCK_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clusterIpv4CidrBlock field is set. + */ + public boolean hasClusterIpv4CidrBlock() { + return clusterIpAllocationCase_ == 4; + } + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterIpv4CidrBlock. + */ + public java.lang.String getClusterIpv4CidrBlock() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 4) { + ref = clusterIpAllocation_; + } + if (ref instanceof java.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 (clusterIpAllocationCase_ == 4) { + clusterIpAllocation_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getClusterIpv4CidrBlockBytes() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 4) { + ref = clusterIpAllocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (clusterIpAllocationCase_ == 4) { + clusterIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICES_SECONDARY_RANGE_NAME_FIELD_NUMBER = 3; + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the servicesSecondaryRangeName field is set. + */ + public boolean hasServicesSecondaryRangeName() { + return servicesIpAllocationCase_ == 3; + } + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servicesSecondaryRangeName. + */ + public java.lang.String getServicesSecondaryRangeName() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 3) { + ref = servicesIpAllocation_; + } + if (ref instanceof java.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 (servicesIpAllocationCase_ == 3) { + servicesIpAllocation_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for servicesSecondaryRangeName. + */ + public com.google.protobuf.ByteString getServicesSecondaryRangeNameBytes() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 3) { + ref = servicesIpAllocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (servicesIpAllocationCase_ == 3) { + servicesIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICES_IPV4_CIDR_BLOCK_FIELD_NUMBER = 5; + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the servicesIpv4CidrBlock field is set. + */ + public boolean hasServicesIpv4CidrBlock() { + return servicesIpAllocationCase_ == 5; + } + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The servicesIpv4CidrBlock. + */ + public java.lang.String getServicesIpv4CidrBlock() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 5) { + ref = servicesIpAllocation_; + } + if (ref instanceof java.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 (servicesIpAllocationCase_ == 5) { + servicesIpAllocation_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for servicesIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getServicesIpv4CidrBlockBytes() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 5) { + ref = servicesIpAllocation_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (servicesIpAllocationCase_ == 5) { + servicesIpAllocation_ = 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 (useIpAliases_ != false) { + output.writeBool(1, useIpAliases_); + } + if (clusterIpAllocationCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterIpAllocation_); + } + if (servicesIpAllocationCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servicesIpAllocation_); + } + if (clusterIpAllocationCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterIpAllocation_); + } + if (servicesIpAllocationCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, servicesIpAllocation_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (useIpAliases_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, useIpAliases_); + } + if (clusterIpAllocationCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterIpAllocation_); + } + if (servicesIpAllocationCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servicesIpAllocation_); + } + if (clusterIpAllocationCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterIpAllocation_); + } + if (servicesIpAllocationCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, servicesIpAllocation_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy other = + (com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) obj; + + if (getUseIpAliases() != other.getUseIpAliases()) return false; + if (!getClusterIpAllocationCase().equals(other.getClusterIpAllocationCase())) return false; + switch (clusterIpAllocationCase_) { + case 2: + if (!getClusterSecondaryRangeName().equals(other.getClusterSecondaryRangeName())) + return false; + break; + case 4: + if (!getClusterIpv4CidrBlock().equals(other.getClusterIpv4CidrBlock())) return false; + break; + case 0: + default: + } + if (!getServicesIpAllocationCase().equals(other.getServicesIpAllocationCase())) return false; + switch (servicesIpAllocationCase_) { + case 3: + if (!getServicesSecondaryRangeName().equals(other.getServicesSecondaryRangeName())) + return false; + break; + case 5: + if (!getServicesIpv4CidrBlock().equals(other.getServicesIpv4CidrBlock())) 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) + USE_IP_ALIASES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseIpAliases()); + switch (clusterIpAllocationCase_) { + case 2: + hash = (37 * hash) + CLUSTER_SECONDARY_RANGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getClusterSecondaryRangeName().hashCode(); + break; + case 4: + hash = (37 * hash) + CLUSTER_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getClusterIpv4CidrBlock().hashCode(); + break; + case 0: + default: + } + switch (servicesIpAllocationCase_) { + case 3: + hash = (37 * hash) + SERVICES_SECONDARY_RANGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServicesSecondaryRangeName().hashCode(); + break; + case 5: + hash = (37 * hash) + SERVICES_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getServicesIpv4CidrBlock().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 controlling how IPs are allocated in the
+   * GKE cluster running the Apache Airflow software.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.class, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + useIpAliases_ = false; + + clusterIpAllocationCase_ = 0; + clusterIpAllocation_ = null; + servicesIpAllocationCase_ = 0; + servicesIpAllocation_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_IPAllocationPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy build() { + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy result = + new com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(this); + result.useIpAliases_ = useIpAliases_; + if (clusterIpAllocationCase_ == 2) { + result.clusterIpAllocation_ = clusterIpAllocation_; + } + if (clusterIpAllocationCase_ == 4) { + result.clusterIpAllocation_ = clusterIpAllocation_; + } + if (servicesIpAllocationCase_ == 3) { + result.servicesIpAllocation_ = servicesIpAllocation_; + } + if (servicesIpAllocationCase_ == 5) { + result.servicesIpAllocation_ = servicesIpAllocation_; + } + result.clusterIpAllocationCase_ = clusterIpAllocationCase_; + result.servicesIpAllocationCase_ = servicesIpAllocationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + .getDefaultInstance()) return this; + if (other.getUseIpAliases() != false) { + setUseIpAliases(other.getUseIpAliases()); + } + switch (other.getClusterIpAllocationCase()) { + case CLUSTER_SECONDARY_RANGE_NAME: + { + clusterIpAllocationCase_ = 2; + clusterIpAllocation_ = other.clusterIpAllocation_; + onChanged(); + break; + } + case CLUSTER_IPV4_CIDR_BLOCK: + { + clusterIpAllocationCase_ = 4; + clusterIpAllocation_ = other.clusterIpAllocation_; + onChanged(); + break; + } + case CLUSTERIPALLOCATION_NOT_SET: + { + break; + } + } + switch (other.getServicesIpAllocationCase()) { + case SERVICES_SECONDARY_RANGE_NAME: + { + servicesIpAllocationCase_ = 3; + servicesIpAllocation_ = other.servicesIpAllocation_; + onChanged(); + break; + } + case SERVICES_IPV4_CIDR_BLOCK: + { + servicesIpAllocationCase_ = 5; + servicesIpAllocation_ = other.servicesIpAllocation_; + onChanged(); + break; + } + case SERVICESIPALLOCATION_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.orchestration.airflow.service.v1.IPAllocationPolicy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int clusterIpAllocationCase_ = 0; + private java.lang.Object clusterIpAllocation_; + + public ClusterIpAllocationCase getClusterIpAllocationCase() { + return ClusterIpAllocationCase.forNumber(clusterIpAllocationCase_); + } + + public Builder clearClusterIpAllocation() { + clusterIpAllocationCase_ = 0; + clusterIpAllocation_ = null; + onChanged(); + return this; + } + + private int servicesIpAllocationCase_ = 0; + private java.lang.Object servicesIpAllocation_; + + public ServicesIpAllocationCase getServicesIpAllocationCase() { + return ServicesIpAllocationCase.forNumber(servicesIpAllocationCase_); + } + + public Builder clearServicesIpAllocation() { + servicesIpAllocationCase_ = 0; + servicesIpAllocation_ = null; + onChanged(); + return this; + } + + private boolean useIpAliases_; + /** + * + * + *
+     * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+     * If `true`, a VPC-native cluster is created.
+     * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useIpAliases. + */ + @java.lang.Override + public boolean getUseIpAliases() { + return useIpAliases_; + } + /** + * + * + *
+     * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+     * If `true`, a VPC-native cluster is created.
+     * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The useIpAliases to set. + * @return This builder for chaining. + */ + public Builder setUseIpAliases(boolean value) { + + useIpAliases_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+     * If `true`, a VPC-native cluster is created.
+     * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUseIpAliases() { + + useIpAliases_ = false; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the GKE cluster's secondary range used to allocate
+     * IP addresses to pods.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the clusterSecondaryRangeName field is set. + */ + @java.lang.Override + public boolean hasClusterSecondaryRangeName() { + return clusterIpAllocationCase_ == 2; + } + /** + * + * + *
+     * Optional. The name of the GKE cluster's secondary range used to allocate
+     * IP addresses to pods.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clusterSecondaryRangeName. + */ + @java.lang.Override + public java.lang.String getClusterSecondaryRangeName() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 2) { + ref = clusterIpAllocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (clusterIpAllocationCase_ == 2) { + clusterIpAllocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the GKE cluster's secondary range used to allocate
+     * IP addresses to pods.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for clusterSecondaryRangeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterSecondaryRangeNameBytes() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 2) { + ref = clusterIpAllocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (clusterIpAllocationCase_ == 2) { + clusterIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the GKE cluster's secondary range used to allocate
+     * IP addresses to pods.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The clusterSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setClusterSecondaryRangeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterIpAllocationCase_ = 2; + clusterIpAllocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the GKE cluster's secondary range used to allocate
+     * IP addresses to pods.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearClusterSecondaryRangeName() { + if (clusterIpAllocationCase_ == 2) { + clusterIpAllocationCase_ = 0; + clusterIpAllocation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The name of the GKE cluster's secondary range used to allocate
+     * IP addresses to pods.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for clusterSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setClusterSecondaryRangeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterIpAllocationCase_ = 2; + clusterIpAllocation_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clusterIpv4CidrBlock field is set. + */ + @java.lang.Override + public boolean hasClusterIpv4CidrBlock() { + return clusterIpAllocationCase_ == 4; + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getClusterIpv4CidrBlock() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 4) { + ref = clusterIpAllocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (clusterIpAllocationCase_ == 4) { + clusterIpAllocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIpv4CidrBlockBytes() { + java.lang.Object ref = ""; + if (clusterIpAllocationCase_ == 4) { + ref = clusterIpAllocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (clusterIpAllocationCase_ == 4) { + clusterIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clusterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setClusterIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + clusterIpAllocationCase_ = 4; + clusterIpAllocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClusterIpv4CidrBlock() { + if (clusterIpAllocationCase_ == 4) { + clusterIpAllocationCase_ = 0; + clusterIpAllocation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clusterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setClusterIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + clusterIpAllocationCase_ = 4; + clusterIpAllocation_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the servicesSecondaryRangeName field is set. + */ + @java.lang.Override + public boolean hasServicesSecondaryRangeName() { + return servicesIpAllocationCase_ == 3; + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servicesSecondaryRangeName. + */ + @java.lang.Override + public java.lang.String getServicesSecondaryRangeName() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 3) { + ref = servicesIpAllocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (servicesIpAllocationCase_ == 3) { + servicesIpAllocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for servicesSecondaryRangeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServicesSecondaryRangeNameBytes() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 3) { + ref = servicesIpAllocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (servicesIpAllocationCase_ == 3) { + servicesIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The servicesSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setServicesSecondaryRangeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servicesIpAllocationCase_ = 3; + servicesIpAllocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServicesSecondaryRangeName() { + if (servicesIpAllocationCase_ == 3) { + servicesIpAllocationCase_ = 0; + servicesIpAllocation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for servicesSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setServicesSecondaryRangeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servicesIpAllocationCase_ = 3; + servicesIpAllocation_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the servicesIpv4CidrBlock field is set. + */ + @java.lang.Override + public boolean hasServicesIpv4CidrBlock() { + return servicesIpAllocationCase_ == 5; + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The servicesIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getServicesIpv4CidrBlock() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 5) { + ref = servicesIpAllocation_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (servicesIpAllocationCase_ == 5) { + servicesIpAllocation_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for servicesIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServicesIpv4CidrBlockBytes() { + java.lang.Object ref = ""; + if (servicesIpAllocationCase_ == 5) { + ref = servicesIpAllocation_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (servicesIpAllocationCase_ == 5) { + servicesIpAllocation_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The servicesIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setServicesIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + servicesIpAllocationCase_ = 5; + servicesIpAllocation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServicesIpv4CidrBlock() { + if (servicesIpAllocationCase_ == 5) { + servicesIpAllocationCase_ = 0; + servicesIpAllocation_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * GKE cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for servicesIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setServicesIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + servicesIpAllocationCase_ = 5; + servicesIpAllocation_ = 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.orchestration.airflow.service.v1.IPAllocationPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + private static final com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IPAllocationPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IPAllocationPolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/IPAllocationPolicyOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/IPAllocationPolicyOrBuilder.java new file mode 100644 index 00000000..95501b66 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/IPAllocationPolicyOrBuilder.java @@ -0,0 +1,270 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface IPAllocationPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+   * If `true`, a VPC-native cluster is created.
+   * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useIpAliases. + */ + boolean getUseIpAliases(); + + /** + * + * + *
+   * Optional. The name of the GKE cluster's secondary range used to allocate
+   * IP addresses to pods.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clusterSecondaryRangeName field is set. + */ + boolean hasClusterSecondaryRangeName(); + /** + * + * + *
+   * Optional. The name of the GKE cluster's secondary range used to allocate
+   * IP addresses to pods.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterSecondaryRangeName. + */ + java.lang.String getClusterSecondaryRangeName(); + /** + * + * + *
+   * Optional. The name of the GKE cluster's secondary range used to allocate
+   * IP addresses to pods.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterSecondaryRangeName. + */ + com.google.protobuf.ByteString getClusterSecondaryRangeNameBytes(); + + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the clusterIpv4CidrBlock field is set. + */ + boolean hasClusterIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterIpv4CidrBlock. + */ + java.lang.String getClusterIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterIpv4CidrBlock. + */ + com.google.protobuf.ByteString getClusterIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the servicesSecondaryRangeName field is set. + */ + boolean hasServicesSecondaryRangeName(); + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servicesSecondaryRangeName. + */ + java.lang.String getServicesSecondaryRangeName(); + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for servicesSecondaryRangeName. + */ + com.google.protobuf.ByteString getServicesSecondaryRangeNameBytes(); + + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the servicesIpv4CidrBlock field is set. + */ + boolean hasServicesIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The servicesIpv4CidrBlock. + */ + java.lang.String getServicesIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * GKE cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for servicesIpv4CidrBlock. + */ + com.google.protobuf.ByteString getServicesIpv4CidrBlockBytes(); + + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + .ClusterIpAllocationCase + getClusterIpAllocationCase(); + + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + .ServicesIpAllocationCase + getServicesIpAllocationCase(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersion.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersion.java new file mode 100644 index 00000000..4855262d --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersion.java @@ -0,0 +1,1472 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * ImageVersion information
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ImageVersion} + */ +public final class ImageVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ImageVersion) + ImageVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageVersion.newBuilder() to construct. + private ImageVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageVersion() { + imageVersionId_ = ""; + supportedPythonVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageVersion( + 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(); + + imageVersionId_ = s; + break; + } + case 16: + { + isDefault_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + supportedPythonVersions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + supportedPythonVersions_.add(s); + break; + } + case 34: + { + com.google.type.Date.Builder subBuilder = null; + if (releaseDate_ != null) { + subBuilder = releaseDate_.toBuilder(); + } + releaseDate_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(releaseDate_); + releaseDate_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + creationDisabled_ = input.readBool(); + break; + } + case 48: + { + upgradeDisabled_ = 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_ & 0x00000001) != 0)) { + supportedPythonVersions_ = supportedPythonVersions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.class, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder.class); + } + + public static final int IMAGE_VERSION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object imageVersionId_; + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The imageVersionId. + */ + @java.lang.Override + public java.lang.String getImageVersionId() { + java.lang.Object ref = imageVersionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The bytes for imageVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageVersionIdBytes() { + java.lang.Object ref = imageVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 2; + private boolean isDefault_; + /** + * + * + *
+   * Whether this is the default ImageVersion used by Composer during
+   * environment creation if no input ImageVersion is specified.
+   * 
+ * + * bool is_default = 2; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int SUPPORTED_PYTHON_VERSIONS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList supportedPythonVersions_; + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return A list containing the supportedPythonVersions. + */ + public com.google.protobuf.ProtocolStringList getSupportedPythonVersionsList() { + return supportedPythonVersions_; + } + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return The count of supportedPythonVersions. + */ + public int getSupportedPythonVersionsCount() { + return supportedPythonVersions_.size(); + } + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the element to return. + * @return The supportedPythonVersions at the given index. + */ + public java.lang.String getSupportedPythonVersions(int index) { + return supportedPythonVersions_.get(index); + } + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedPythonVersions at the given index. + */ + public com.google.protobuf.ByteString getSupportedPythonVersionsBytes(int index) { + return supportedPythonVersions_.getByteString(index); + } + + public static final int RELEASE_DATE_FIELD_NUMBER = 4; + private com.google.type.Date releaseDate_; + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return Whether the releaseDate field is set. + */ + @java.lang.Override + public boolean hasReleaseDate() { + return releaseDate_ != null; + } + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return The releaseDate. + */ + @java.lang.Override + public com.google.type.Date getReleaseDate() { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getReleaseDateOrBuilder() { + return getReleaseDate(); + } + + public static final int CREATION_DISABLED_FIELD_NUMBER = 5; + private boolean creationDisabled_; + /** + * + * + *
+   * Whether it is impossible to create an environment with the image version.
+   * 
+ * + * bool creation_disabled = 5; + * + * @return The creationDisabled. + */ + @java.lang.Override + public boolean getCreationDisabled() { + return creationDisabled_; + } + + public static final int UPGRADE_DISABLED_FIELD_NUMBER = 6; + private boolean upgradeDisabled_; + /** + * + * + *
+   * Whether it is impossible to upgrade an environment running with the image
+   * version.
+   * 
+ * + * bool upgrade_disabled = 6; + * + * @return The upgradeDisabled. + */ + @java.lang.Override + public boolean getUpgradeDisabled() { + return upgradeDisabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getImageVersionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageVersionId_); + } + if (isDefault_ != false) { + output.writeBool(2, isDefault_); + } + for (int i = 0; i < supportedPythonVersions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, supportedPythonVersions_.getRaw(i)); + } + if (releaseDate_ != null) { + output.writeMessage(4, getReleaseDate()); + } + if (creationDisabled_ != false) { + output.writeBool(5, creationDisabled_); + } + if (upgradeDisabled_ != false) { + output.writeBool(6, upgradeDisabled_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageVersionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageVersionId_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isDefault_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedPythonVersions_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedPythonVersions_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedPythonVersionsList().size(); + } + if (releaseDate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReleaseDate()); + } + if (creationDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, creationDisabled_); + } + if (upgradeDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, upgradeDisabled_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.ImageVersion)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ImageVersion other = + (com.google.cloud.orchestration.airflow.service.v1.ImageVersion) obj; + + if (!getImageVersionId().equals(other.getImageVersionId())) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (!getSupportedPythonVersionsList().equals(other.getSupportedPythonVersionsList())) + return false; + if (hasReleaseDate() != other.hasReleaseDate()) return false; + if (hasReleaseDate()) { + if (!getReleaseDate().equals(other.getReleaseDate())) return false; + } + if (getCreationDisabled() != other.getCreationDisabled()) return false; + if (getUpgradeDisabled() != other.getUpgradeDisabled()) return false; + if (!unknownFields.equals(other.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_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageVersionId().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + if (getSupportedPythonVersionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_PYTHON_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedPythonVersionsList().hashCode(); + } + if (hasReleaseDate()) { + hash = (37 * hash) + RELEASE_DATE_FIELD_NUMBER; + hash = (53 * hash) + getReleaseDate().hashCode(); + } + hash = (37 * hash) + CREATION_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCreationDisabled()); + hash = (37 * hash) + UPGRADE_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpgradeDisabled()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * ImageVersion information
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ImageVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ImageVersion) + com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.class, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder.class); + } + + // Construct using com.google.cloud.orchestration.airflow.service.v1.ImageVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + imageVersionId_ = ""; + + isDefault_ = false; + + supportedPythonVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (releaseDateBuilder_ == null) { + releaseDate_ = null; + } else { + releaseDate_ = null; + releaseDateBuilder_ = null; + } + creationDisabled_ = false; + + upgradeDisabled_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersion.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion build() { + com.google.cloud.orchestration.airflow.service.v1.ImageVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ImageVersion result = + new com.google.cloud.orchestration.airflow.service.v1.ImageVersion(this); + int from_bitField0_ = bitField0_; + result.imageVersionId_ = imageVersionId_; + result.isDefault_ = isDefault_; + if (((bitField0_ & 0x00000001) != 0)) { + supportedPythonVersions_ = supportedPythonVersions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedPythonVersions_ = supportedPythonVersions_; + if (releaseDateBuilder_ == null) { + result.releaseDate_ = releaseDate_; + } else { + result.releaseDate_ = releaseDateBuilder_.build(); + } + result.creationDisabled_ = creationDisabled_; + result.upgradeDisabled_ = upgradeDisabled_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.ImageVersion) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1.ImageVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.orchestration.airflow.service.v1.ImageVersion other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ImageVersion.getDefaultInstance()) + return this; + if (!other.getImageVersionId().isEmpty()) { + imageVersionId_ = other.imageVersionId_; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (!other.supportedPythonVersions_.isEmpty()) { + if (supportedPythonVersions_.isEmpty()) { + supportedPythonVersions_ = other.supportedPythonVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.addAll(other.supportedPythonVersions_); + } + onChanged(); + } + if (other.hasReleaseDate()) { + mergeReleaseDate(other.getReleaseDate()); + } + if (other.getCreationDisabled() != false) { + setCreationDisabled(other.getCreationDisabled()); + } + if (other.getUpgradeDisabled() != false) { + setUpgradeDisabled(other.getUpgradeDisabled()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.ImageVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.ImageVersion) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object imageVersionId_ = ""; + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @return The imageVersionId. + */ + public java.lang.String getImageVersionId() { + java.lang.Object ref = imageVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @return The bytes for imageVersionId. + */ + public com.google.protobuf.ByteString getImageVersionIdBytes() { + java.lang.Object ref = imageVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @param value The imageVersionId to set. + * @return This builder for chaining. + */ + public Builder setImageVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageVersionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageVersionId() { + + imageVersionId_ = getDefaultInstance().getImageVersionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @param value The bytes for imageVersionId to set. + * @return This builder for chaining. + */ + public Builder setImageVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageVersionId_ = value; + onChanged(); + return this; + } + + private boolean isDefault_; + /** + * + * + *
+     * Whether this is the default ImageVersion used by Composer during
+     * environment creation if no input ImageVersion is specified.
+     * 
+ * + * bool is_default = 2; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + * + * + *
+     * Whether this is the default ImageVersion used by Composer during
+     * environment creation if no input ImageVersion is specified.
+     * 
+ * + * bool is_default = 2; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether this is the default ImageVersion used by Composer during
+     * environment creation if no input ImageVersion is specified.
+     * 
+ * + * bool is_default = 2; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + + isDefault_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList supportedPythonVersions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSupportedPythonVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedPythonVersions_ = + new com.google.protobuf.LazyStringArrayList(supportedPythonVersions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @return A list containing the supportedPythonVersions. + */ + public com.google.protobuf.ProtocolStringList getSupportedPythonVersionsList() { + return supportedPythonVersions_.getUnmodifiableView(); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @return The count of supportedPythonVersions. + */ + public int getSupportedPythonVersionsCount() { + return supportedPythonVersions_.size(); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the element to return. + * @return The supportedPythonVersions at the given index. + */ + public java.lang.String getSupportedPythonVersions(int index) { + return supportedPythonVersions_.get(index); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedPythonVersions at the given index. + */ + public com.google.protobuf.ByteString getSupportedPythonVersionsBytes(int index) { + return supportedPythonVersions_.getByteString(index); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index to set the value at. + * @param value The supportedPythonVersions to set. + * @return This builder for chaining. + */ + public Builder setSupportedPythonVersions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param value The supportedPythonVersions to add. + * @return This builder for chaining. + */ + public Builder addSupportedPythonVersions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param values The supportedPythonVersions to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedPythonVersions(java.lang.Iterable values) { + ensureSupportedPythonVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedPythonVersions_); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @return This builder for chaining. + */ + public Builder clearSupportedPythonVersions() { + supportedPythonVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param value The bytes of the supportedPythonVersions to add. + * @return This builder for chaining. + */ + public Builder addSupportedPythonVersionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.add(value); + onChanged(); + return this; + } + + private com.google.type.Date releaseDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + releaseDateBuilder_; + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + * + * @return Whether the releaseDate field is set. + */ + public boolean hasReleaseDate() { + return releaseDateBuilder_ != null || releaseDate_ != null; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + * + * @return The releaseDate. + */ + public com.google.type.Date getReleaseDate() { + if (releaseDateBuilder_ == null) { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } else { + return releaseDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder setReleaseDate(com.google.type.Date value) { + if (releaseDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + releaseDate_ = value; + onChanged(); + } else { + releaseDateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder setReleaseDate(com.google.type.Date.Builder builderForValue) { + if (releaseDateBuilder_ == null) { + releaseDate_ = builderForValue.build(); + onChanged(); + } else { + releaseDateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder mergeReleaseDate(com.google.type.Date value) { + if (releaseDateBuilder_ == null) { + if (releaseDate_ != null) { + releaseDate_ = + com.google.type.Date.newBuilder(releaseDate_).mergeFrom(value).buildPartial(); + } else { + releaseDate_ = value; + } + onChanged(); + } else { + releaseDateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder clearReleaseDate() { + if (releaseDateBuilder_ == null) { + releaseDate_ = null; + onChanged(); + } else { + releaseDate_ = null; + releaseDateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public com.google.type.Date.Builder getReleaseDateBuilder() { + + onChanged(); + return getReleaseDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public com.google.type.DateOrBuilder getReleaseDateOrBuilder() { + if (releaseDateBuilder_ != null) { + return releaseDateBuilder_.getMessageOrBuilder(); + } else { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getReleaseDateFieldBuilder() { + if (releaseDateBuilder_ == null) { + releaseDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getReleaseDate(), getParentForChildren(), isClean()); + releaseDate_ = null; + } + return releaseDateBuilder_; + } + + private boolean creationDisabled_; + /** + * + * + *
+     * Whether it is impossible to create an environment with the image version.
+     * 
+ * + * bool creation_disabled = 5; + * + * @return The creationDisabled. + */ + @java.lang.Override + public boolean getCreationDisabled() { + return creationDisabled_; + } + /** + * + * + *
+     * Whether it is impossible to create an environment with the image version.
+     * 
+ * + * bool creation_disabled = 5; + * + * @param value The creationDisabled to set. + * @return This builder for chaining. + */ + public Builder setCreationDisabled(boolean value) { + + creationDisabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether it is impossible to create an environment with the image version.
+     * 
+ * + * bool creation_disabled = 5; + * + * @return This builder for chaining. + */ + public Builder clearCreationDisabled() { + + creationDisabled_ = false; + onChanged(); + return this; + } + + private boolean upgradeDisabled_; + /** + * + * + *
+     * Whether it is impossible to upgrade an environment running with the image
+     * version.
+     * 
+ * + * bool upgrade_disabled = 6; + * + * @return The upgradeDisabled. + */ + @java.lang.Override + public boolean getUpgradeDisabled() { + return upgradeDisabled_; + } + /** + * + * + *
+     * Whether it is impossible to upgrade an environment running with the image
+     * version.
+     * 
+ * + * bool upgrade_disabled = 6; + * + * @param value The upgradeDisabled to set. + * @return This builder for chaining. + */ + public Builder setUpgradeDisabled(boolean value) { + + upgradeDisabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether it is impossible to upgrade an environment running with the image
+     * version.
+     * 
+ * + * bool upgrade_disabled = 6; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeDisabled() { + + upgradeDisabled_ = 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.orchestration.airflow.service.v1.ImageVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ImageVersion) + private static final com.google.cloud.orchestration.airflow.service.v1.ImageVersion + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.ImageVersion(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ImageVersion + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageVersion(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionOrBuilder.java new file mode 100644 index 00000000..b978b4a5 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ImageVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ImageVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The imageVersionId. + */ + java.lang.String getImageVersionId(); + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The bytes for imageVersionId. + */ + com.google.protobuf.ByteString getImageVersionIdBytes(); + + /** + * + * + *
+   * Whether this is the default ImageVersion used by Composer during
+   * environment creation if no input ImageVersion is specified.
+   * 
+ * + * bool is_default = 2; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return A list containing the supportedPythonVersions. + */ + java.util.List getSupportedPythonVersionsList(); + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return The count of supportedPythonVersions. + */ + int getSupportedPythonVersionsCount(); + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the element to return. + * @return The supportedPythonVersions at the given index. + */ + java.lang.String getSupportedPythonVersions(int index); + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedPythonVersions at the given index. + */ + com.google.protobuf.ByteString getSupportedPythonVersionsBytes(int index); + + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return Whether the releaseDate field is set. + */ + boolean hasReleaseDate(); + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return The releaseDate. + */ + com.google.type.Date getReleaseDate(); + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + */ + com.google.type.DateOrBuilder getReleaseDateOrBuilder(); + + /** + * + * + *
+   * Whether it is impossible to create an environment with the image version.
+   * 
+ * + * bool creation_disabled = 5; + * + * @return The creationDisabled. + */ + boolean getCreationDisabled(); + + /** + * + * + *
+   * Whether it is impossible to upgrade an environment running with the image
+   * version.
+   * 
+ * + * bool upgrade_disabled = 6; + * + * @return The upgradeDisabled. + */ + boolean getUpgradeDisabled(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsOuterClass.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsOuterClass.java new file mode 100644 index 00000000..c12d0e1f --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ImageVersionsOuterClass.java @@ -0,0 +1,132 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public final class ImageVersionsOuterClass { + private ImageVersionsOuterClass() {} + + 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_orchestration_airflow_service_v1_ListImageVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nBgoogle/cloud/orchestration/airflow/ser" + + "vice/v1/image_versions.proto\022-google.clo" + + "ud.orchestration.airflow.service.v1\032\034goo" + + "gle/api/annotations.proto\032\027google/api/cl" + + "ient.proto\032\026google/type/date.proto\"p\n\030Li" + + "stImageVersionsRequest\022\016\n\006parent\030\001 \001(\t\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\035\n" + + "\025include_past_releases\030\004 \001(\010\"\211\001\n\031ListIma" + + "geVersionsResponse\022S\n\016image_versions\030\001 \003" + + "(\0132;.google.cloud.orchestration.airflow." + + "service.v1.ImageVersion\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\275\001\n\014ImageVersion\022\030\n\020image_versi" + + "on_id\030\001 \001(\t\022\022\n\nis_default\030\002 \001(\010\022!\n\031suppo" + + "rted_python_versions\030\003 \003(\t\022\'\n\014release_da" + + "te\030\004 \001(\0132\021.google.type.Date\022\031\n\021creation_" + + "disabled\030\005 \001(\010\022\030\n\020upgrade_disabled\030\006 \001(\010" + + "2\311\002\n\rImageVersions\022\352\001\n\021ListImageVersions" + + "\022G.google.cloud.orchestration.airflow.se" + + "rvice.v1.ListImageVersionsRequest\032H.goog" + + "le.cloud.orchestration.airflow.service.v" + + "1.ListImageVersionsResponse\"B\202\323\344\223\0023\0221/v1" + + "/{parent=projects/*/locations/*}/imageVe" + + "rsions\332A\006parent\032K\312A\027composer.googleapis." + + "com\322A.https://www.googleapis.com/auth/cl" + + "oud-platformB\213\001\n1com.google.cloud.orches" + + "tration.airflow.service.v1P\001ZTgoogle.gol" + + "ang.org/genproto/googleapis/cloud/orches" + + "tration/airflow/service/v1;serviceb\006prot" + + "o3" + }; + 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.type.DateProto.getDescriptor(), + }); + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "IncludePastReleases", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_descriptor, + new java.lang.String[] { + "ImageVersions", "NextPageToken", + }); + internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_ImageVersion_descriptor, + new java.lang.String[] { + "ImageVersionId", + "IsDefault", + "SupportedPythonVersions", + "ReleaseDate", + "CreationDisabled", + "UpgradeDisabled", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsRequest.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsRequest.java new file mode 100644 index 00000000..cafd6225 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsRequest.java @@ -0,0 +1,932 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * List environments in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} + */ +public final class ListEnvironmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + ListEnvironmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsRequest.newBuilder() to construct. + private ListEnvironmentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsRequest( + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.class, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of environments to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * 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.orchestration.airflow.service.v1.ListEnvironmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest other = + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) 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.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List environments in a project and location.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.class, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest build() { + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest result = + new com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(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.orchestration.airflow.service.v1.ListEnvironmentsRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + .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.orchestration.airflow.service.v1.ListEnvironmentsRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of environments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of environments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of environments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * 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.orchestration.airflow.service.v1.ListEnvironmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsRequestOrBuilder.java new file mode 100644 index 00000000..e937ef0e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ListEnvironmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of environments to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsResponse.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsResponse.java new file mode 100644 index 00000000..4955f2fd --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsResponse.java @@ -0,0 +1,1202 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The environments in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} + */ +public final class ListEnvironmentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + ListEnvironmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsResponse.newBuilder() to construct. + private ListEnvironmentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsResponse() { + environments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsResponse( + 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)) { + environments_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1.Environment>(); + mutable_bitField0_ |= 0x00000001; + } + environments_.add( + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.Environment.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)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.class, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.Builder + .class); + } + + public static final int ENVIRONMENTS_FIELD_NUMBER = 1; + private java.util.List + environments_; + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + @java.lang.Override + public java.util.List + getEnvironmentsList() { + return environments_; + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + getEnvironmentsOrBuilderList() { + return environments_; + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + @java.lang.Override + public int getEnvironmentsCount() { + return environments_.size(); + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironments(int index) { + return environments_.get(index); + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder + getEnvironmentsOrBuilder(int index) { + return environments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < environments_.size(); i++) { + output.writeMessage(1, environments_.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 < environments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, environments_.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.orchestration.airflow.service.v1.ListEnvironmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse other = + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) obj; + + if (!getEnvironmentsList().equals(other.getEnvironmentsList())) 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 (getEnvironmentsCount() > 0) { + hash = (37 * hash) + ENVIRONMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentsList().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.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 environments in a project and location.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.class, + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvironmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + environmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse build() { + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse result = + new com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(this); + int from_bitField0_ = bitField0_; + if (environmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.environments_ = environments_; + } else { + result.environments_ = environmentsBuilder_.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.orchestration.airflow.service.v1.ListEnvironmentsResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + .getDefaultInstance()) return this; + if (environmentsBuilder_ == null) { + if (!other.environments_.isEmpty()) { + if (environments_.isEmpty()) { + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnvironmentsIsMutable(); + environments_.addAll(other.environments_); + } + onChanged(); + } + } else { + if (!other.environments_.isEmpty()) { + if (environmentsBuilder_.isEmpty()) { + environmentsBuilder_.dispose(); + environmentsBuilder_ = null; + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + environmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvironmentsFieldBuilder() + : null; + } else { + environmentsBuilder_.addAllMessages(other.environments_); + } + } + } + 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.orchestration.airflow.service.v1.ListEnvironmentsResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + environments_ = java.util.Collections.emptyList(); + + private void ensureEnvironmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList( + environments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + environmentsBuilder_; + + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public java.util.List + getEnvironmentsList() { + if (environmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(environments_); + } else { + return environmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public int getEnvironmentsCount() { + if (environmentsBuilder_ == null) { + return environments_.size(); + } else { + return environmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironments( + int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder setEnvironments( + int index, com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.set(index, value); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder setEnvironments( + int index, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder addEnvironments( + com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(value); + onChanged(); + } else { + environmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder addEnvironments( + int index, com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(index, value); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder addEnvironments( + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder addEnvironments( + int index, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder addAllEnvironments( + java.lang.Iterable + values) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, environments_); + onChanged(); + } else { + environmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder clearEnvironments() { + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + environmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public Builder removeEnvironments(int index) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.remove(index); + onChanged(); + } else { + environmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment.Builder + getEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder + getEnvironmentsOrBuilder(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + getEnvironmentsOrBuilderList() { + if (environmentsBuilder_ != null) { + return environmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environments_); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment.Builder + addEnvironmentsBuilder() { + return getEnvironmentsFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment.Builder + addEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance()); + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + public java.util.List + getEnvironmentsBuilderList() { + return getEnvironmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + getEnvironmentsFieldBuilder() { + if (environmentsBuilder_ == null) { + environmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder>( + environments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + environments_ = null; + } + return environmentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + private static final com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsResponseOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsResponseOrBuilder.java new file mode 100644 index 00000000..ec86ac5f --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListEnvironmentsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ListEnvironmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + java.util.List + getEnvironmentsList(); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironments(int index); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + int getEnvironmentsCount(); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + java.util.List + getEnvironmentsOrBuilderList(); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder getEnvironmentsOrBuilder( + int index); + + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsRequest.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsRequest.java new file mode 100644 index 00000000..630e0b36 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsRequest.java @@ -0,0 +1,1027 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * List ImageVersions in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} + */ +public final class ListImageVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + ListImageVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImageVersionsRequest.newBuilder() to construct. + private ListImageVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImageVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImageVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListImageVersionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + includePastReleases_ = 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.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.class, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of image_versions to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_PAST_RELEASES_FIELD_NUMBER = 4; + private boolean includePastReleases_; + /** + * + * + *
+   * Whether or not image versions from old releases should be included.
+   * 
+ * + * bool include_past_releases = 4; + * + * @return The includePastReleases. + */ + @java.lang.Override + public boolean getIncludePastReleases() { + return includePastReleases_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (includePastReleases_ != false) { + output.writeBool(4, includePastReleases_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (includePastReleases_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includePastReleases_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest other = + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getIncludePastReleases() != other.getIncludePastReleases()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + INCLUDE_PAST_RELEASES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludePastReleases()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List ImageVersions in a project and location.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.class, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + includePastReleases_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest build() { + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest result = + new com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.includePastReleases_ = includePastReleases_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getIncludePastReleases() != false) { + setIncludePastReleases(other.getIncludePastReleases()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of image_versions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of image_versions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of image_versions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private boolean includePastReleases_; + /** + * + * + *
+     * Whether or not image versions from old releases should be included.
+     * 
+ * + * bool include_past_releases = 4; + * + * @return The includePastReleases. + */ + @java.lang.Override + public boolean getIncludePastReleases() { + return includePastReleases_; + } + /** + * + * + *
+     * Whether or not image versions from old releases should be included.
+     * 
+ * + * bool include_past_releases = 4; + * + * @param value The includePastReleases to set. + * @return This builder for chaining. + */ + public Builder setIncludePastReleases(boolean value) { + + includePastReleases_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not image versions from old releases should be included.
+     * 
+ * + * bool include_past_releases = 4; + * + * @return This builder for chaining. + */ + public Builder clearIncludePastReleases() { + + includePastReleases_ = 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.orchestration.airflow.service.v1.ListImageVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImageVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListImageVersionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsRequestOrBuilder.java new file mode 100644 index 00000000..5b65b32b --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ListImageVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of image_versions to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Whether or not image versions from old releases should be included.
+   * 
+ * + * bool include_past_releases = 4; + * + * @return The includePastReleases. + */ + boolean getIncludePastReleases(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsResponse.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsResponse.java new file mode 100644 index 00000000..34f6f485 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsResponse.java @@ -0,0 +1,1224 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The ImageVersions in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} + */ +public final class ListImageVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + ListImageVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImageVersionsResponse.newBuilder() to construct. + private ListImageVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImageVersionsResponse() { + imageVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImageVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListImageVersionsResponse( + 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)) { + imageVersions_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1.ImageVersion>(); + mutable_bitField0_ |= 0x00000001; + } + imageVersions_.add( + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.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)) { + imageVersions_ = java.util.Collections.unmodifiableList(imageVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.class, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.Builder + .class); + } + + public static final int IMAGE_VERSIONS_FIELD_NUMBER = 1; + private java.util.List + imageVersions_; + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public java.util.List + getImageVersionsList() { + return imageVersions_; + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder> + getImageVersionsOrBuilderList() { + return imageVersions_; + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public int getImageVersionsCount() { + return imageVersions_.size(); + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion getImageVersions( + int index) { + return imageVersions_.get(index); + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder + getImageVersionsOrBuilder(int index) { + return imageVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < imageVersions_.size(); i++) { + output.writeMessage(1, imageVersions_.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 < imageVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, imageVersions_.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.orchestration.airflow.service.v1.ListImageVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse other = + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) obj; + + if (!getImageVersionsList().equals(other.getImageVersionsList())) 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 (getImageVersionsCount() > 0) { + hash = (37 * hash) + IMAGE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getImageVersionsList().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.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ImageVersions in a project and location.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.class, + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getImageVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageVersionsBuilder_ == null) { + imageVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + imageVersionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_ListImageVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse build() { + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse result = + new com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(this); + int from_bitField0_ = bitField0_; + if (imageVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + imageVersions_ = java.util.Collections.unmodifiableList(imageVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.imageVersions_ = imageVersions_; + } else { + result.imageVersions_ = imageVersionsBuilder_.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.orchestration.airflow.service.v1.ListImageVersionsResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + .getDefaultInstance()) return this; + if (imageVersionsBuilder_ == null) { + if (!other.imageVersions_.isEmpty()) { + if (imageVersions_.isEmpty()) { + imageVersions_ = other.imageVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImageVersionsIsMutable(); + imageVersions_.addAll(other.imageVersions_); + } + onChanged(); + } + } else { + if (!other.imageVersions_.isEmpty()) { + if (imageVersionsBuilder_.isEmpty()) { + imageVersionsBuilder_.dispose(); + imageVersionsBuilder_ = null; + imageVersions_ = other.imageVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + imageVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getImageVersionsFieldBuilder() + : null; + } else { + imageVersionsBuilder_.addAllMessages(other.imageVersions_); + } + } + } + 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.orchestration.airflow.service.v1.ListImageVersionsResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + imageVersions_ = java.util.Collections.emptyList(); + + private void ensureImageVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + imageVersions_ = + new java.util.ArrayList( + imageVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.ImageVersion, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder, + com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder> + imageVersionsBuilder_; + + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public java.util.List + getImageVersionsList() { + if (imageVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(imageVersions_); + } else { + return imageVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public int getImageVersionsCount() { + if (imageVersionsBuilder_ == null) { + return imageVersions_.size(); + } else { + return imageVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion getImageVersions( + int index) { + if (imageVersionsBuilder_ == null) { + return imageVersions_.get(index); + } else { + return imageVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder setImageVersions( + int index, com.google.cloud.orchestration.airflow.service.v1.ImageVersion value) { + if (imageVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageVersionsIsMutable(); + imageVersions_.set(index, value); + onChanged(); + } else { + imageVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder setImageVersions( + int index, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder builderForValue) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + imageVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion value) { + if (imageVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageVersionsIsMutable(); + imageVersions_.add(value); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + int index, com.google.cloud.orchestration.airflow.service.v1.ImageVersion value) { + if (imageVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageVersionsIsMutable(); + imageVersions_.add(index, value); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder builderForValue) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.add(builderForValue.build()); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + int index, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder builderForValue) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder addAllImageVersions( + java.lang.Iterable + values) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, imageVersions_); + onChanged(); + } else { + imageVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder clearImageVersions() { + if (imageVersionsBuilder_ == null) { + imageVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + imageVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public Builder removeImageVersions(int index) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.remove(index); + onChanged(); + } else { + imageVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder + getImageVersionsBuilder(int index) { + return getImageVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder + getImageVersionsOrBuilder(int index) { + if (imageVersionsBuilder_ == null) { + return imageVersions_.get(index); + } else { + return imageVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder> + getImageVersionsOrBuilderList() { + if (imageVersionsBuilder_ != null) { + return imageVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(imageVersions_); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder + addImageVersionsBuilder() { + return getImageVersionsFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.getDefaultInstance()); + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder + addImageVersionsBuilder(int index) { + return getImageVersionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.getDefaultInstance()); + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + public java.util.List + getImageVersionsBuilderList() { + return getImageVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.ImageVersion, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder, + com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder> + getImageVersionsFieldBuilder() { + if (imageVersionsBuilder_ == null) { + imageVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.ImageVersion, + com.google.cloud.orchestration.airflow.service.v1.ImageVersion.Builder, + com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder>( + imageVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + imageVersions_ = null; + } + return imageVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + private static final com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImageVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListImageVersionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsResponseOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsResponseOrBuilder.java new file mode 100644 index 00000000..6e1c1557 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/ListImageVersionsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface ListImageVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + java.util.List + getImageVersionsList(); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.ImageVersion getImageVersions(int index); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + int getImageVersionsCount(); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + java.util.List + getImageVersionsOrBuilderList(); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.ImageVersionOrBuilder getImageVersionsOrBuilder( + int index); + + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/NodeConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/NodeConfig.java new file mode 100644 index 00000000..9e257f8e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/NodeConfig.java @@ -0,0 +1,2718 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The configuration information for the Kubernetes Engine nodes running
+ * the Apache Airflow software.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.NodeConfig} + */ +public final class NodeConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.NodeConfig) + NodeConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeConfig.newBuilder() to construct. + private NodeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeConfig() { + location_ = ""; + machineType_ = ""; + network_ = ""; + subnetwork_ = ""; + oauthScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAccount_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NodeConfig( + 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(); + + location_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetwork_ = s; + break; + } + case 40: + { + diskSizeGb_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + oauthScopes_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 66: + { + 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 74: + { + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder + subBuilder = null; + if (ipAllocationPolicy_ != null) { + subBuilder = ipAllocationPolicy_.toBuilder(); + } + ipAllocationPolicy_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ipAllocationPolicy_); + ipAllocationPolicy_ = 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)) { + oauthScopes_ = oauthScopes_.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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.class, + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private volatile java.lang.Object location_; + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 3; + private volatile java.lang.Object network_; + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the "default" network ID in the environment's project is
+   * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the "default" network ID in the environment's project is
+   * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_FIELD_NUMBER = 4; + private volatile java.lang.Object subnetwork_; + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4; + * + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4; + * + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 5; + private int diskSizeGb_; + /** + * + * + *
+   * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+   * If unspecified, defaults to 100GB. Cannot be updated.
+   * 
+ * + * int32 disk_size_gb = 5; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public int getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int OAUTH_SCOPES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList oauthScopes_; + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @return A list containing the oauthScopes. + */ + public com.google.protobuf.ProtocolStringList getOauthScopesList() { + return oauthScopes_; + } + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @return The count of oauthScopes. + */ + public int getOauthScopesCount() { + return oauthScopes_.size(); + } + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index of the element to return. + * @return The oauthScopes at the given index. + */ + public java.lang.String getOauthScopes(int index) { + return oauthScopes_.get(index); + } + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index of the value to return. + * @return The bytes of the oauthScopes at the given index. + */ + public com.google.protobuf.ByteString getOauthScopesBytes(int index) { + return oauthScopes_.getByteString(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Optional. The Google Cloud Platform Service Account to be used by the node
+   * VMs. If a service account is not specified, the "default" Compute Engine
+   * service account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7; + * + * @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 Google Cloud Platform Service Account to be used by the node
+   * VMs. If a service account is not specified, the "default" Compute Engine
+   * service account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7; + * + * @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 TAGS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @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); + } + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @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 IP_ALLOCATION_POLICY_FIELD_NUMBER = 9; + private com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ipAllocationPolicy_; + /** + * + * + *
+   * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipAllocationPolicy field is set. + */ + @java.lang.Override + public boolean hasIpAllocationPolicy() { + return ipAllocationPolicy_ != null; + } + /** + * + * + *
+   * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipAllocationPolicy. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + getIpAllocationPolicy() { + return ipAllocationPolicy_ == null + ? com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.getDefaultInstance() + : ipAllocationPolicy_; + } + /** + * + * + *
+   * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder + getIpAllocationPolicyOrBuilder() { + return getIpAllocationPolicy(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getLocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineType_); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, network_); + } + if (!getSubnetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subnetwork_); + } + if (diskSizeGb_ != 0) { + output.writeInt32(5, diskSizeGb_); + } + for (int i = 0; i < oauthScopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, oauthScopes_.getRaw(i)); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccount_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tags_.getRaw(i)); + } + if (ipAllocationPolicy_ != null) { + output.writeMessage(9, getIpAllocationPolicy()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getLocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineType_); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, network_); + } + if (!getSubnetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subnetwork_); + } + if (diskSizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, diskSizeGb_); + } + { + int dataSize = 0; + for (int i = 0; i < oauthScopes_.size(); i++) { + dataSize += computeStringSizeNoTag(oauthScopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getOauthScopesList().size(); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccount_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (ipAllocationPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getIpAllocationPolicy()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.NodeConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.NodeConfig other = + (com.google.cloud.orchestration.airflow.service.v1.NodeConfig) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnetwork().equals(other.getSubnetwork())) return false; + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + if (!getOauthScopesList().equals(other.getOauthScopesList())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (hasIpAllocationPolicy() != other.hasIpAllocationPolicy()) return false; + if (hasIpAllocationPolicy()) { + if (!getIpAllocationPolicy().equals(other.getIpAllocationPolicy())) return false; + } + if (!unknownFields.equals(other.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) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getDiskSizeGb(); + if (getOauthScopesCount() > 0) { + hash = (37 * hash) + OAUTH_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getOauthScopesList().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (hasIpAllocationPolicy()) { + hash = (37 * hash) + IP_ALLOCATION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIpAllocationPolicy().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration information for the Kubernetes Engine nodes running
+   * the Apache Airflow software.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.NodeConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.NodeConfig) + com.google.cloud.orchestration.airflow.service.v1.NodeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.class, + com.google.cloud.orchestration.airflow.service.v1.NodeConfig.Builder.class); + } + + // Construct using com.google.cloud.orchestration.airflow.service.v1.NodeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + location_ = ""; + + machineType_ = ""; + + network_ = ""; + + subnetwork_ = ""; + + diskSizeGb_ = 0; + + oauthScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccount_ = ""; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicy_ = null; + } else { + ipAllocationPolicy_ = null; + ipAllocationPolicyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_NodeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.NodeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig build() { + com.google.cloud.orchestration.airflow.service.v1.NodeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.NodeConfig result = + new com.google.cloud.orchestration.airflow.service.v1.NodeConfig(this); + int from_bitField0_ = bitField0_; + result.location_ = location_; + result.machineType_ = machineType_; + result.network_ = network_; + result.subnetwork_ = subnetwork_; + result.diskSizeGb_ = diskSizeGb_; + if (((bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = oauthScopes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.oauthScopes_ = oauthScopes_; + result.serviceAccount_ = serviceAccount_; + if (((bitField0_ & 0x00000002) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tags_ = tags_; + if (ipAllocationPolicyBuilder_ == null) { + result.ipAllocationPolicy_ = ipAllocationPolicy_; + } else { + result.ipAllocationPolicy_ = ipAllocationPolicyBuilder_.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.orchestration.airflow.service.v1.NodeConfig) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1.NodeConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.orchestration.airflow.service.v1.NodeConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.NodeConfig.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + onChanged(); + } + if (other.getDiskSizeGb() != 0) { + setDiskSizeGb(other.getDiskSizeGb()); + } + if (!other.oauthScopes_.isEmpty()) { + if (oauthScopes_.isEmpty()) { + oauthScopes_ = other.oauthScopes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOauthScopesIsMutable(); + oauthScopes_.addAll(other.oauthScopes_); + } + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (other.hasIpAllocationPolicy()) { + mergeIpAllocationPolicy(other.getIpAllocationPolicy()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.NodeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.NodeConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the "default" network ID in the environment's project is
+     * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the "default" network ID in the environment's project is
+     * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the "default" network ID in the environment's project is
+     * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the "default" network ID in the environment's project is
+     * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the "default" network ID in the environment's project is
+     * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4; + * + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4; + * + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4; + * + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetwork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4; + * + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + + subnetwork_ = getDefaultInstance().getSubnetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4; + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetwork_ = value; + onChanged(); + return this; + } + + private int diskSizeGb_; + /** + * + * + *
+     * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+     * If unspecified, defaults to 100GB. Cannot be updated.
+     * 
+ * + * int32 disk_size_gb = 5; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public int getDiskSizeGb() { + return diskSizeGb_; + } + /** + * + * + *
+     * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+     * If unspecified, defaults to 100GB. Cannot be updated.
+     * 
+ * + * int32 disk_size_gb = 5; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(int value) { + + diskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+     * If unspecified, defaults to 100GB. Cannot be updated.
+     * 
+ * + * int32 disk_size_gb = 5; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + + diskSizeGb_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList oauthScopes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureOauthScopesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = new com.google.protobuf.LazyStringArrayList(oauthScopes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @return A list containing the oauthScopes. + */ + public com.google.protobuf.ProtocolStringList getOauthScopesList() { + return oauthScopes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @return The count of oauthScopes. + */ + public int getOauthScopesCount() { + return oauthScopes_.size(); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index of the element to return. + * @return The oauthScopes at the given index. + */ + public java.lang.String getOauthScopes(int index) { + return oauthScopes_.get(index); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index of the value to return. + * @return The bytes of the oauthScopes at the given index. + */ + public com.google.protobuf.ByteString getOauthScopesBytes(int index) { + return oauthScopes_.getByteString(index); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index to set the value at. + * @param value The oauthScopes to set. + * @return This builder for chaining. + */ + public Builder setOauthScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOauthScopesIsMutable(); + oauthScopes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @param value The oauthScopes to add. + * @return This builder for chaining. + */ + public Builder addOauthScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOauthScopesIsMutable(); + oauthScopes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @param values The oauthScopes to add. + * @return This builder for chaining. + */ + public Builder addAllOauthScopes(java.lang.Iterable values) { + ensureOauthScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, oauthScopes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @return This builder for chaining. + */ + public Builder clearOauthScopes() { + oauthScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6; + * + * @param value The bytes of the oauthScopes to add. + * @return This builder for chaining. + */ + public Builder addOauthScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOauthScopesIsMutable(); + oauthScopes_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Optional. The Google Cloud Platform Service Account to be used by the node
+     * VMs. If a service account is not specified, the "default" Compute Engine
+     * service account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7; + * + * @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 Google Cloud Platform Service Account to be used by the node
+     * VMs. If a service account is not specified, the "default" Compute Engine
+     * service account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7; + * + * @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 Google Cloud Platform Service Account to be used by the node
+     * VMs. If a service account is not specified, the "default" Compute Engine
+     * service account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7; + * + * @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 Google Cloud Platform Service Account to be used by the node
+     * VMs. If a service account is not specified, the "default" Compute Engine
+     * service account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Google Cloud Platform Service Account to be used by the node
+     * VMs. If a service account is not specified, the "default" Compute Engine
+     * service account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7; + * + * @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 tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @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); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @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); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @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; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @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; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @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; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8; + * + * @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.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + ipAllocationPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder> + ipAllocationPolicyBuilder_; + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipAllocationPolicy field is set. + */ + public boolean hasIpAllocationPolicy() { + return ipAllocationPolicyBuilder_ != null || ipAllocationPolicy_ != null; + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipAllocationPolicy. + */ + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + getIpAllocationPolicy() { + if (ipAllocationPolicyBuilder_ == null) { + return ipAllocationPolicy_ == null + ? com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + .getDefaultInstance() + : ipAllocationPolicy_; + } else { + return ipAllocationPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpAllocationPolicy( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy value) { + if (ipAllocationPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ipAllocationPolicy_ = value; + onChanged(); + } else { + ipAllocationPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpAllocationPolicy( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder + builderForValue) { + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicy_ = builderForValue.build(); + onChanged(); + } else { + ipAllocationPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIpAllocationPolicy( + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy value) { + if (ipAllocationPolicyBuilder_ == null) { + if (ipAllocationPolicy_ != null) { + ipAllocationPolicy_ = + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.newBuilder( + ipAllocationPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + ipAllocationPolicy_ = value; + } + onChanged(); + } else { + ipAllocationPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIpAllocationPolicy() { + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicy_ = null; + onChanged(); + } else { + ipAllocationPolicy_ = null; + ipAllocationPolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder + getIpAllocationPolicyBuilder() { + + onChanged(); + return getIpAllocationPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder + getIpAllocationPolicyOrBuilder() { + if (ipAllocationPolicyBuilder_ != null) { + return ipAllocationPolicyBuilder_.getMessageOrBuilder(); + } else { + return ipAllocationPolicy_ == null + ? com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + .getDefaultInstance() + : ipAllocationPolicy_; + } + } + /** + * + * + *
+     * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder> + getIpAllocationPolicyFieldBuilder() { + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.Builder, + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder>( + getIpAllocationPolicy(), getParentForChildren(), isClean()); + ipAllocationPolicy_ = null; + } + return ipAllocationPolicyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.NodeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.NodeConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.NodeConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.NodeConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.NodeConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.NodeConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/NodeConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/NodeConfigOrBuilder.java new file mode 100644 index 00000000..3837419c --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/NodeConfigOrBuilder.java @@ -0,0 +1,422 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface NodeConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.NodeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the "default" network ID in the environment's project is
+   * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the "default" network ID in the environment's project is
+   * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4; + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4; + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); + + /** + * + * + *
+   * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+   * If unspecified, defaults to 100GB. Cannot be updated.
+   * 
+ * + * int32 disk_size_gb = 5; + * + * @return The diskSizeGb. + */ + int getDiskSizeGb(); + + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @return A list containing the oauthScopes. + */ + java.util.List getOauthScopesList(); + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @return The count of oauthScopes. + */ + int getOauthScopesCount(); + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index of the element to return. + * @return The oauthScopes at the given index. + */ + java.lang.String getOauthScopes(int index); + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6; + * + * @param index The index of the value to return. + * @return The bytes of the oauthScopes at the given index. + */ + com.google.protobuf.ByteString getOauthScopesBytes(int index); + + /** + * + * + *
+   * Optional. The Google Cloud Platform Service Account to be used by the node
+   * VMs. If a service account is not specified, the "default" Compute Engine
+   * service account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Optional. The Google Cloud Platform Service Account to be used by the node
+   * VMs. If a service account is not specified, the "default" Compute Engine
+   * service account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8; + * + * @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); + + /** + * + * + *
+   * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipAllocationPolicy field is set. + */ + boolean hasIpAllocationPolicy(); + /** + * + * + *
+   * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipAllocationPolicy. + */ + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy getIpAllocationPolicy(); + /** + * + * + *
+   * Optional. The configuration for controlling how IPs are allocated in the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicyOrBuilder + getIpAllocationPolicyOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java new file mode 100644 index 00000000..58fe565e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadata.java @@ -0,0 +1,2145 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/operations.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Metadata describing an operation.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + state_ = 0; + operationType_ = 0; + resource_ = ""; + resourceUuid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + operationType_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUuid_ = s; + break; + } + case 42: + { + 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 50: + { + 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; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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.orchestration.airflow.service.v1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.class, + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Builder.class); + } + + /** + * + * + *
+   * An enum describing the overall state of an operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.orchestration.airflow.service.v1.OperationMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0, 0), + /** + * + * + *
+     * The operation has been created but is not yet started.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1, 1), + /** + * + * + *
+     * The operation is underway.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2, 2), + /** + * + * + *
+     * The operation completed successfully.
+     * 
+ * + * SUCCEEDED = 3; + */ + SUCCEEDED(3, 3), + /** + * + * + *
+     * The operation is no longer running but did not succeed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(5, 4), + UNRECOGNIZED(-1, -1), + ; + + /** SUCCESSFUL = 3; */ + public static final State SUCCESSFUL = SUCCEEDED; + /** + * + * + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The operation has been created but is not yet started.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * The operation is underway.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The operation completed successfully.
+     * 
+ * + * SUCCEEDED = 3; + */ + public static final int SUCCEEDED_VALUE = 3; + /** SUCCESSFUL = 3; */ + public static final int SUCCESSFUL_VALUE = 3; + /** + * + * + *
+     * The operation is no longer running but did not succeed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return RUNNING; + case 3: + return SUCCEEDED; + case 4: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final State[] VALUES = getStaticValuesArray(); + + private static State[] getStaticValuesArray() { + return new State[] { + STATE_UNSPECIFIED, PENDING, RUNNING, SUCCEEDED, SUCCESSFUL, FAILED, + }; + } + + 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 index; + private final int value; + + private State(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1.OperationMetadata.State) + } + + /** + * + * + *
+   * Type of longrunning operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A resource creation operation.
+     * 
+ * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
+     * A resource deletion operation.
+     * 
+ * + * DELETE = 2; + */ + DELETE(2), + /** + * + * + *
+     * A resource update operation.
+     * 
+ * + * UPDATE = 3; + */ + UPDATE(3), + /** + * + * + *
+     * A resource check operation.
+     * 
+ * + * CHECK = 4; + */ + CHECK(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A resource creation operation.
+     * 
+ * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * + * + *
+     * A resource deletion operation.
+     * 
+ * + * DELETE = 2; + */ + public static final int DELETE_VALUE = 2; + /** + * + * + *
+     * A resource update operation.
+     * 
+ * + * UPDATE = 3; + */ + public static final int UPDATE_VALUE = 3; + /** + * + * + *
+     * A resource check operation.
+     * 
+ * + * CHECK = 4; + */ + public static final int CHECK_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 CREATE; + case 2: + return DELETE; + case 3: + return UPDATE; + case 4: + return CHECK; + 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.orchestration.airflow.service.v1.OperationMetadata.getDescriptor() + .getEnumTypes() + .get(1); + } + + 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.orchestration.airflow.service.v1.OperationMetadata.Type) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State result = + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State.UNRECOGNIZED + : result; + } + + public static final int OPERATION_TYPE_FIELD_NUMBER = 2; + private int operationType_; + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type + getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type result = + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type.valueOf( + operationType_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private volatile java.lang.Object resource_; + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_UUID_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUuid_; + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The resourceUuid. + */ + @java.lang.Override + public java.lang.String getResourceUuid() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The bytes for resourceUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUuidBytes() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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.orchestration.airflow.service.v1.OperationMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (operationType_ + != com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type.TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, operationType_); + } + if (!getResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resource_); + } + if (!getResourceUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUuid_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(6, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (operationType_ + != com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type.TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, operationType_); + } + if (!getResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resource_); + } + if (!getResourceUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUuid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata other = + (com.google.cloud.orchestration.airflow.service.v1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (operationType_ != other.operationType_) return false; + if (!getResource().equals(other.getResource())) return false; + if (!getResourceUuid().equals(other.getResourceUuid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.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) + OPERATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + operationType_; + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + RESOURCE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getResourceUuid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata describing an operation.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.OperationMetadata) + com.google.cloud.orchestration.airflow.service.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.class, + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + operationType_ = 0; + + resource_ = ""; + + resourceUuid_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata build() { + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata result = + new com.google.cloud.orchestration.airflow.service.v1.OperationMetadata(this); + result.state_ = state_; + result.operationType_ = operationType_; + result.resource_ = resource_; + result.resourceUuid_ = resourceUuid_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.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.orchestration.airflow.service.v1.OperationMetadata) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.operationType_ != 0) { + setOperationTypeValue(other.getOperationTypeValue()); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getResourceUuid().isEmpty()) { + resourceUuid_ = other.resourceUuid_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.OperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.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. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State result = + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State.valueOf(state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int operationType_ = 0; + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @param value The enum numeric value on the wire for operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationTypeValue(int value) { + + operationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type + getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type result = + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type.valueOf( + operationType_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @param value The operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationType( + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + operationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearOperationType() { + + operationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUuid_ = ""; + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @return The resourceUuid. + */ + public java.lang.String getResourceUuid() { + java.lang.Object ref = resourceUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @return The bytes for resourceUuid. + */ + public com.google.protobuf.ByteString getResourceUuidBytes() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @param value The resourceUuid to set. + * @return This builder for chaining. + */ + public Builder setResourceUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @return This builder for chaining. + */ + public Builder clearResourceUuid() { + + resourceUuid_ = getDefaultInstance().getResourceUuid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @param value The bytes for resourceUuid to set. + * @return This builder for chaining. + */ + public Builder setResourceUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUuid_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.OperationMetadata) + private static final com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.OperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..d2a36466 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,202 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/operations.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * + * @return The state. + */ + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State getState(); + + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return The enum numeric value on the wire for operationType. + */ + int getOperationTypeValue(); + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * + * + * @return The operationType. + */ + com.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type getOperationType(); + + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The resourceUuid. + */ + java.lang.String getResourceUuid(); + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The bytes for resourceUuid. + */ + com.google.protobuf.ByteString getResourceUuidBytes(); + + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java new file mode 100644 index 00000000..c7b38a4a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/OperationsProto.java @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/operations.proto + +package com.google.cloud.orchestration.airflow.service.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_orchestration_airflow_service_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_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/orchestration/airflow/ser" + + "vice/v1/operations.proto\022-google.cloud.o" + + "rchestration.airflow.service.v1\032\037google/" + + "protobuf/timestamp.proto\032\034google/api/ann" + + "otations.proto\"\207\004\n\021OperationMetadata\022U\n\005" + + "state\030\001 \001(\0162F.google.cloud.orchestration" + + ".airflow.service.v1.OperationMetadata.St" + + "ate\022]\n\016operation_type\030\002 \001(\0162E.google.clo" + + "ud.orchestration.airflow.service.v1.Oper" + + "ationMetadata.Type\022\020\n\010resource\030\003 \001(\t\022\025\n\r" + + "resource_uuid\030\004 \001(\t\022/\n\013create_time\030\005 \001(\013" + + "2\032.google.protobuf.Timestamp\022,\n\010end_time" + + "\030\006 \001(\0132\032.google.protobuf.Timestamp\"g\n\005St" + + "ate\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020\001\022" + + "\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\016\n\nSUCCESSFU" + + "L\020\003\022\n\n\006FAILED\020\004\032\002\020\001\"K\n\004Type\022\024\n\020TYPE_UNSP" + + "ECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DELETE\020\002\022\n\n\006UPD" + + "ATE\020\003\022\t\n\005CHECK\020\004B\234\001\n1com.google.cloud.or" + + "chestration.airflow.service.v1B\017Operatio" + + "nsProtoP\001ZTgoogle.golang.org/genproto/go" + + "ogleapis/cloud/orchestration/airflow/ser" + + "vice/v1;serviceb\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_orchestration_airflow_service_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "State", "OperationType", "Resource", "ResourceUuid", "CreateTime", "EndTime", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateClusterConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateClusterConfig.java new file mode 100644 index 00000000..0f8bf9d7 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateClusterConfig.java @@ -0,0 +1,966 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Configuration options for the private GKE cluster in a Cloud Composer
+ * environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} + */ +public final class PrivateClusterConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + PrivateClusterConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateClusterConfig.newBuilder() to construct. + private PrivateClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateClusterConfig() { + masterIpv4CidrBlock_ = ""; + masterIpv4ReservedRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateClusterConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PrivateClusterConfig( + 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: + { + enablePrivateEndpoint_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + masterIpv4CidrBlock_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + masterIpv4ReservedRange_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.class, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder.class); + } + + public static final int ENABLE_PRIVATE_ENDPOINT_FIELD_NUMBER = 1; + private boolean enablePrivateEndpoint_; + /** + * + * + *
+   * Optional. If `true`, access to the public endpoint of the GKE cluster is
+   * denied.
+   * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEndpoint. + */ + @java.lang.Override + public boolean getEnablePrivateEndpoint() { + return enablePrivateEndpoint_; + } + + public static final int MASTER_IPV4_CIDR_BLOCK_FIELD_NUMBER = 2; + private volatile java.lang.Object masterIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The masterIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getMasterIpv4CidrBlock() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for masterIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMasterIpv4CidrBlockBytes() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MASTER_IPV4_RESERVED_RANGE_FIELD_NUMBER = 3; + private volatile java.lang.Object masterIpv4ReservedRange_; + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the GKE cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The masterIpv4ReservedRange. + */ + @java.lang.Override + public java.lang.String getMasterIpv4ReservedRange() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4ReservedRange_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the GKE cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for masterIpv4ReservedRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMasterIpv4ReservedRangeBytes() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4ReservedRange_ = 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 (enablePrivateEndpoint_ != false) { + output.writeBool(1, enablePrivateEndpoint_); + } + if (!getMasterIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, masterIpv4CidrBlock_); + } + if (!getMasterIpv4ReservedRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, masterIpv4ReservedRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePrivateEndpoint_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateEndpoint_); + } + if (!getMasterIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, masterIpv4CidrBlock_); + } + if (!getMasterIpv4ReservedRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, masterIpv4ReservedRange_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig other = + (com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) obj; + + if (getEnablePrivateEndpoint() != other.getEnablePrivateEndpoint()) return false; + if (!getMasterIpv4CidrBlock().equals(other.getMasterIpv4CidrBlock())) return false; + if (!getMasterIpv4ReservedRange().equals(other.getMasterIpv4ReservedRange())) return false; + if (!unknownFields.equals(other.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_PRIVATE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateEndpoint()); + hash = (37 * hash) + MASTER_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getMasterIpv4CidrBlock().hashCode(); + hash = (37 * hash) + MASTER_IPV4_RESERVED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMasterIpv4ReservedRange().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 options for the private GKE cluster in a Cloud Composer
+   * environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.class, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enablePrivateEndpoint_ = false; + + masterIpv4CidrBlock_ = ""; + + masterIpv4ReservedRange_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateClusterConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig build() { + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig result = + new com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(this); + result.enablePrivateEndpoint_ = enablePrivateEndpoint_; + result.masterIpv4CidrBlock_ = masterIpv4CidrBlock_; + result.masterIpv4ReservedRange_ = masterIpv4ReservedRange_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + .getDefaultInstance()) return this; + if (other.getEnablePrivateEndpoint() != false) { + setEnablePrivateEndpoint(other.getEnablePrivateEndpoint()); + } + if (!other.getMasterIpv4CidrBlock().isEmpty()) { + masterIpv4CidrBlock_ = other.masterIpv4CidrBlock_; + onChanged(); + } + if (!other.getMasterIpv4ReservedRange().isEmpty()) { + masterIpv4ReservedRange_ = other.masterIpv4ReservedRange_; + 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.orchestration.airflow.service.v1.PrivateClusterConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enablePrivateEndpoint_; + /** + * + * + *
+     * Optional. If `true`, access to the public endpoint of the GKE cluster is
+     * denied.
+     * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEndpoint. + */ + @java.lang.Override + public boolean getEnablePrivateEndpoint() { + return enablePrivateEndpoint_; + } + /** + * + * + *
+     * Optional. If `true`, access to the public endpoint of the GKE cluster is
+     * denied.
+     * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePrivateEndpoint to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateEndpoint(boolean value) { + + enablePrivateEndpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If `true`, access to the public endpoint of the GKE cluster is
+     * denied.
+     * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateEndpoint() { + + enablePrivateEndpoint_ = false; + onChanged(); + return this; + } + + private java.lang.Object masterIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The masterIpv4CidrBlock. + */ + public java.lang.String getMasterIpv4CidrBlock() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for masterIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getMasterIpv4CidrBlockBytes() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The masterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + masterIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMasterIpv4CidrBlock() { + + masterIpv4CidrBlock_ = getDefaultInstance().getMasterIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for masterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + masterIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object masterIpv4ReservedRange_ = ""; + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the GKE cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The masterIpv4ReservedRange. + */ + public java.lang.String getMasterIpv4ReservedRange() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4ReservedRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the GKE cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for masterIpv4ReservedRange. + */ + public com.google.protobuf.ByteString getMasterIpv4ReservedRangeBytes() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4ReservedRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the GKE cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The masterIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4ReservedRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + masterIpv4ReservedRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the GKE cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearMasterIpv4ReservedRange() { + + masterIpv4ReservedRange_ = getDefaultInstance().getMasterIpv4ReservedRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the GKE cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for masterIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4ReservedRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + masterIpv4ReservedRange_ = 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.orchestration.airflow.service.v1.PrivateClusterConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateClusterConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrivateClusterConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateClusterConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateClusterConfigOrBuilder.java new file mode 100644 index 00000000..c6865b4e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateClusterConfigOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface PrivateClusterConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. If `true`, access to the public endpoint of the GKE cluster is
+   * denied.
+   * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEndpoint. + */ + boolean getEnablePrivateEndpoint(); + + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The masterIpv4CidrBlock. + */ + java.lang.String getMasterIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for masterIpv4CidrBlock. + */ + com.google.protobuf.ByteString getMasterIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the GKE cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The masterIpv4ReservedRange. + */ + java.lang.String getMasterIpv4ReservedRange(); + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the GKE cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for masterIpv4ReservedRange. + */ + com.google.protobuf.ByteString getMasterIpv4ReservedRangeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateEnvironmentConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateEnvironmentConfig.java new file mode 100644 index 00000000..03758146 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateEnvironmentConfig.java @@ -0,0 +1,1481 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The configuration information for configuring a Private IP Cloud Composer
+ * environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} + */ +public final class PrivateEnvironmentConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + PrivateEnvironmentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateEnvironmentConfig.newBuilder() to construct. + private PrivateEnvironmentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateEnvironmentConfig() { + webServerIpv4CidrBlock_ = ""; + cloudSqlIpv4CidrBlock_ = ""; + webServerIpv4ReservedRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateEnvironmentConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PrivateEnvironmentConfig( + 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: + { + enablePrivateEnvironment_ = input.readBool(); + break; + } + case 18: + { + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder + subBuilder = null; + if (privateClusterConfig_ != null) { + subBuilder = privateClusterConfig_.toBuilder(); + } + privateClusterConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(privateClusterConfig_); + privateClusterConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + webServerIpv4CidrBlock_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudSqlIpv4CidrBlock_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + webServerIpv4ReservedRange_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder + .class); + } + + public static final int ENABLE_PRIVATE_ENVIRONMENT_FIELD_NUMBER = 1; + private boolean enablePrivateEnvironment_; + /** + * + * + *
+   * Optional. If `true`, a Private IP Cloud Composer environment is created.
+   * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+   * set to true.
+   * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEnvironment. + */ + @java.lang.Override + public boolean getEnablePrivateEnvironment() { + return enablePrivateEnvironment_; + } + + public static final int PRIVATE_CLUSTER_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + privateClusterConfig_; + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateClusterConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateClusterConfig() { + return privateClusterConfig_ != null; + } + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateClusterConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + getPrivateClusterConfig() { + return privateClusterConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + .getDefaultInstance() + : privateClusterConfig_; + } + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder + getPrivateClusterConfigOrBuilder() { + return getPrivateClusterConfig(); + } + + public static final int WEB_SERVER_IPV4_CIDR_BLOCK_FIELD_NUMBER = 3; + private volatile java.lang.Object webServerIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+   * `cloud_sql_ipv4_cidr_block`.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The webServerIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getWebServerIpv4CidrBlock() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+   * `cloud_sql_ipv4_cidr_block`.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for webServerIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebServerIpv4CidrBlockBytes() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_SQL_IPV4_CIDR_BLOCK_FIELD_NUMBER = 4; + private volatile java.lang.Object cloudSqlIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cloudSqlIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getCloudSqlIpv4CidrBlock() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for cloudSqlIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlIpv4CidrBlockBytes() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_SERVER_IPV4_RESERVED_RANGE_FIELD_NUMBER = 5; + private volatile java.lang.Object webServerIpv4ReservedRange_; + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The webServerIpv4ReservedRange. + */ + @java.lang.Override + public java.lang.String getWebServerIpv4ReservedRange() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4ReservedRange_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for webServerIpv4ReservedRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebServerIpv4ReservedRangeBytes() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4ReservedRange_ = 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 (enablePrivateEnvironment_ != false) { + output.writeBool(1, enablePrivateEnvironment_); + } + if (privateClusterConfig_ != null) { + output.writeMessage(2, getPrivateClusterConfig()); + } + if (!getWebServerIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, webServerIpv4CidrBlock_); + } + if (!getCloudSqlIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cloudSqlIpv4CidrBlock_); + } + if (!getWebServerIpv4ReservedRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, webServerIpv4ReservedRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePrivateEnvironment_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateEnvironment_); + } + if (privateClusterConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrivateClusterConfig()); + } + if (!getWebServerIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, webServerIpv4CidrBlock_); + } + if (!getCloudSqlIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cloudSqlIpv4CidrBlock_); + } + if (!getWebServerIpv4ReservedRangeBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(5, webServerIpv4ReservedRange_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig other = + (com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) obj; + + if (getEnablePrivateEnvironment() != other.getEnablePrivateEnvironment()) return false; + if (hasPrivateClusterConfig() != other.hasPrivateClusterConfig()) return false; + if (hasPrivateClusterConfig()) { + if (!getPrivateClusterConfig().equals(other.getPrivateClusterConfig())) return false; + } + if (!getWebServerIpv4CidrBlock().equals(other.getWebServerIpv4CidrBlock())) return false; + if (!getCloudSqlIpv4CidrBlock().equals(other.getCloudSqlIpv4CidrBlock())) return false; + if (!getWebServerIpv4ReservedRange().equals(other.getWebServerIpv4ReservedRange())) + return false; + if (!unknownFields.equals(other.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_PRIVATE_ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateEnvironment()); + if (hasPrivateClusterConfig()) { + hash = (37 * hash) + PRIVATE_CLUSTER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateClusterConfig().hashCode(); + } + hash = (37 * hash) + WEB_SERVER_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getWebServerIpv4CidrBlock().hashCode(); + hash = (37 * hash) + CLOUD_SQL_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlIpv4CidrBlock().hashCode(); + hash = (37 * hash) + WEB_SERVER_IPV4_RESERVED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getWebServerIpv4ReservedRange().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration information for configuring a Private IP Cloud Composer
+   * environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enablePrivateEnvironment_ = false; + + if (privateClusterConfigBuilder_ == null) { + privateClusterConfig_ = null; + } else { + privateClusterConfig_ = null; + privateClusterConfigBuilder_ = null; + } + webServerIpv4CidrBlock_ = ""; + + cloudSqlIpv4CidrBlock_ = ""; + + webServerIpv4ReservedRange_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_PrivateEnvironmentConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig build() { + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig result = + new com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(this); + result.enablePrivateEnvironment_ = enablePrivateEnvironment_; + if (privateClusterConfigBuilder_ == null) { + result.privateClusterConfig_ = privateClusterConfig_; + } else { + result.privateClusterConfig_ = privateClusterConfigBuilder_.build(); + } + result.webServerIpv4CidrBlock_ = webServerIpv4CidrBlock_; + result.cloudSqlIpv4CidrBlock_ = cloudSqlIpv4CidrBlock_; + result.webServerIpv4ReservedRange_ = webServerIpv4ReservedRange_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + .getDefaultInstance()) return this; + if (other.getEnablePrivateEnvironment() != false) { + setEnablePrivateEnvironment(other.getEnablePrivateEnvironment()); + } + if (other.hasPrivateClusterConfig()) { + mergePrivateClusterConfig(other.getPrivateClusterConfig()); + } + if (!other.getWebServerIpv4CidrBlock().isEmpty()) { + webServerIpv4CidrBlock_ = other.webServerIpv4CidrBlock_; + onChanged(); + } + if (!other.getCloudSqlIpv4CidrBlock().isEmpty()) { + cloudSqlIpv4CidrBlock_ = other.cloudSqlIpv4CidrBlock_; + onChanged(); + } + if (!other.getWebServerIpv4ReservedRange().isEmpty()) { + webServerIpv4ReservedRange_ = other.webServerIpv4ReservedRange_; + 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.orchestration.airflow.service.v1.PrivateEnvironmentConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enablePrivateEnvironment_; + /** + * + * + *
+     * Optional. If `true`, a Private IP Cloud Composer environment is created.
+     * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+     * set to true.
+     * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEnvironment. + */ + @java.lang.Override + public boolean getEnablePrivateEnvironment() { + return enablePrivateEnvironment_; + } + /** + * + * + *
+     * Optional. If `true`, a Private IP Cloud Composer environment is created.
+     * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+     * set to true.
+     * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePrivateEnvironment to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateEnvironment(boolean value) { + + enablePrivateEnvironment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If `true`, a Private IP Cloud Composer environment is created.
+     * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+     * set to true.
+     * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateEnvironment() { + + enablePrivateEnvironment_ = false; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + privateClusterConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder> + privateClusterConfigBuilder_; + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateClusterConfig field is set. + */ + public boolean hasPrivateClusterConfig() { + return privateClusterConfigBuilder_ != null || privateClusterConfig_ != null; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateClusterConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + getPrivateClusterConfig() { + if (privateClusterConfigBuilder_ == null) { + return privateClusterConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + .getDefaultInstance() + : privateClusterConfig_; + } else { + return privateClusterConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateClusterConfig( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig value) { + if (privateClusterConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateClusterConfig_ = value; + onChanged(); + } else { + privateClusterConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateClusterConfig( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder + builderForValue) { + if (privateClusterConfigBuilder_ == null) { + privateClusterConfig_ = builderForValue.build(); + onChanged(); + } else { + privateClusterConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePrivateClusterConfig( + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig value) { + if (privateClusterConfigBuilder_ == null) { + if (privateClusterConfig_ != null) { + privateClusterConfig_ = + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.newBuilder( + privateClusterConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + privateClusterConfig_ = value; + } + onChanged(); + } else { + privateClusterConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPrivateClusterConfig() { + if (privateClusterConfigBuilder_ == null) { + privateClusterConfig_ = null; + onChanged(); + } else { + privateClusterConfig_ = null; + privateClusterConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder + getPrivateClusterConfigBuilder() { + + onChanged(); + return getPrivateClusterConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder + getPrivateClusterConfigOrBuilder() { + if (privateClusterConfigBuilder_ != null) { + return privateClusterConfigBuilder_.getMessageOrBuilder(); + } else { + return privateClusterConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + .getDefaultInstance() + : privateClusterConfig_; + } + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder> + getPrivateClusterConfigFieldBuilder() { + if (privateClusterConfigBuilder_ == null) { + privateClusterConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder>( + getPrivateClusterConfig(), getParentForChildren(), isClean()); + privateClusterConfig_ = null; + } + return privateClusterConfigBuilder_; + } + + private java.lang.Object webServerIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+     * `cloud_sql_ipv4_cidr_block`.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The webServerIpv4CidrBlock. + */ + public java.lang.String getWebServerIpv4CidrBlock() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+     * `cloud_sql_ipv4_cidr_block`.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for webServerIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getWebServerIpv4CidrBlockBytes() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+     * `cloud_sql_ipv4_cidr_block`.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The webServerIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webServerIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+     * `cloud_sql_ipv4_cidr_block`.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWebServerIpv4CidrBlock() { + + webServerIpv4CidrBlock_ = getDefaultInstance().getWebServerIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+     * `cloud_sql_ipv4_cidr_block`.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for webServerIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webServerIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object cloudSqlIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cloudSqlIpv4CidrBlock. + */ + public java.lang.String getCloudSqlIpv4CidrBlock() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for cloudSqlIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getCloudSqlIpv4CidrBlockBytes() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cloudSqlIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlIpv4CidrBlock() { + + cloudSqlIpv4CidrBlock_ = getDefaultInstance().getCloudSqlIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for cloudSqlIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object webServerIpv4ReservedRange_ = ""; + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The webServerIpv4ReservedRange. + */ + public java.lang.String getWebServerIpv4ReservedRange() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4ReservedRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for webServerIpv4ReservedRange. + */ + public com.google.protobuf.ByteString getWebServerIpv4ReservedRangeBytes() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4ReservedRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The webServerIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4ReservedRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webServerIpv4ReservedRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearWebServerIpv4ReservedRange() { + + webServerIpv4ReservedRange_ = getDefaultInstance().getWebServerIpv4ReservedRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for webServerIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4ReservedRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webServerIpv4ReservedRange_ = 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.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateEnvironmentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrivateEnvironmentConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateEnvironmentConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateEnvironmentConfigOrBuilder.java new file mode 100644 index 00000000..b68d8c17 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/PrivateEnvironmentConfigOrBuilder.java @@ -0,0 +1,168 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface PrivateEnvironmentConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. If `true`, a Private IP Cloud Composer environment is created.
+   * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+   * set to true.
+   * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEnvironment. + */ + boolean getEnablePrivateEnvironment(); + + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateClusterConfig field is set. + */ + boolean hasPrivateClusterConfig(); + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateClusterConfig. + */ + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig getPrivateClusterConfig(); + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfigOrBuilder + getPrivateClusterConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+   * `cloud_sql_ipv4_cidr_block`.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The webServerIpv4CidrBlock. + */ + java.lang.String getWebServerIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and
+   * `cloud_sql_ipv4_cidr_block`.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for webServerIpv4CidrBlock. + */ + com.google.protobuf.ByteString getWebServerIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cloudSqlIpv4CidrBlock. + */ + java.lang.String getCloudSqlIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`.
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for cloudSqlIpv4CidrBlock. + */ + com.google.protobuf.ByteString getCloudSqlIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The webServerIpv4ReservedRange. + */ + java.lang.String getWebServerIpv4ReservedRange(); + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for webServerIpv4ReservedRange. + */ + com.google.protobuf.ByteString getWebServerIpv4ReservedRangeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/SoftwareConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/SoftwareConfig.java new file mode 100644 index 00000000..ef439e15 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/SoftwareConfig.java @@ -0,0 +1,2316 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Specifies the selection and configuration of software inside the environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.SoftwareConfig} + */ +public final class SoftwareConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.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_ = ""; + pythonVersion_ = ""; + } + + @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)) { + airflowConfigOverrides_ = + com.google.protobuf.MapField.newMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + airflowConfigOverrides__ = + input.readMessage( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + airflowConfigOverrides_ + .getMutableMap() + .put(airflowConfigOverrides__.getKey(), airflowConfigOverrides__.getValue()); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + pypiPackages_ = + com.google.protobuf.MapField.newMapField( + PypiPackagesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry pypiPackages__ = + input.readMessage( + PypiPackagesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + pypiPackages_.getMutableMap().put(pypiPackages__.getKey(), pypiPackages__.getValue()); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + envVariables_ = + com.google.protobuf.MapField.newMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry envVariables__ = + input.readMessage( + EnvVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + envVariables_.getMutableMap().put(envVariables__.getKey(), envVariables__.getValue()); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pythonVersion_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetAirflowConfigOverrides(); + case 3: + return internalGetPypiPackages(); + case 4: + return internalGetEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.class, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder.class); + } + + public static final int IMAGE_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object imageVersion_; + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @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; + } + } + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @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 AIRFLOW_CONFIG_OVERRIDES_FIELD_NUMBER = 2; + + private static final class AirflowConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField airflowConfigOverrides_; + + private com.google.protobuf.MapField + internalGetAirflowConfigOverrides() { + if (airflowConfigOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + } + return airflowConfigOverrides_; + } + + public int getAirflowConfigOverridesCount() { + return internalGetAirflowConfigOverrides().getMap().size(); + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public boolean containsAirflowConfigOverrides(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAirflowConfigOverrides().getMap().containsKey(key); + } + /** Use {@link #getAirflowConfigOverridesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAirflowConfigOverrides() { + return getAirflowConfigOverridesMap(); + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getAirflowConfigOverridesMap() { + return internalGetAirflowConfigOverrides().getMap(); + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PYPI_PACKAGES_FIELD_NUMBER = 3; + + private static final class PypiPackagesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_PypiPackagesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField pypiPackages_; + + private com.google.protobuf.MapField + internalGetPypiPackages() { + if (pypiPackages_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiPackagesDefaultEntryHolder.defaultEntry); + } + return pypiPackages_; + } + + public int getPypiPackagesCount() { + return internalGetPypiPackages().getMap().size(); + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public boolean containsPypiPackages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiPackages().getMap().containsKey(key); + } + /** Use {@link #getPypiPackagesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiPackages() { + return getPypiPackagesMap(); + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public java.util.Map getPypiPackagesMap() { + return internalGetPypiPackages().getMap(); + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENV_VARIABLES_FIELD_NUMBER = 4; + + private static final class EnvVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_EnvVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField envVariables_; + + private com.google.protobuf.MapField + internalGetEnvVariables() { + if (envVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + } + return envVariables_; + } + + public int getEnvVariablesCount() { + return internalGetEnvVariables().getMap().size(); + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public boolean containsEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvVariables() { + return getEnvVariablesMap(); + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public java.util.Map getEnvVariablesMap() { + return internalGetEnvVariables().getMap(); + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PYTHON_VERSION_FIELD_NUMBER = 6; + private volatile java.lang.Object pythonVersion_; + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6; + * + * @return The pythonVersion. + */ + @java.lang.Override + public java.lang.String getPythonVersion() { + java.lang.Object ref = pythonVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pythonVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6; + * + * @return The bytes for pythonVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPythonVersionBytes() { + java.lang.Object ref = pythonVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pythonVersion_ = 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 (!getImageVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetAirflowConfigOverrides(), + AirflowConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetPypiPackages(), PypiPackagesDefaultEntryHolder.defaultEntry, 3); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEnvVariables(), EnvVariablesDefaultEntryHolder.defaultEntry, 4); + if (!getPythonVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pythonVersion_); + } + 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 : + internalGetAirflowConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry airflowConfigOverrides__ = + AirflowConfigOverridesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, airflowConfigOverrides__); + } + for (java.util.Map.Entry entry : + internalGetPypiPackages().getMap().entrySet()) { + com.google.protobuf.MapEntry pypiPackages__ = + PypiPackagesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, pypiPackages__); + } + for (java.util.Map.Entry entry : + internalGetEnvVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry envVariables__ = + EnvVariablesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, envVariables__); + } + if (!getPythonVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pythonVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig other = + (com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) obj; + + if (!getImageVersion().equals(other.getImageVersion())) return false; + if (!internalGetAirflowConfigOverrides().equals(other.internalGetAirflowConfigOverrides())) + return false; + if (!internalGetPypiPackages().equals(other.internalGetPypiPackages())) return false; + if (!internalGetEnvVariables().equals(other.internalGetEnvVariables())) return false; + if (!getPythonVersion().equals(other.getPythonVersion())) return false; + if (!unknownFields.equals(other.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 (!internalGetAirflowConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + AIRFLOW_CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAirflowConfigOverrides().hashCode(); + } + if (!internalGetPypiPackages().getMap().isEmpty()) { + hash = (37 * hash) + PYPI_PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + internalGetPypiPackages().hashCode(); + } + if (!internalGetEnvVariables().getMap().isEmpty()) { + hash = (37 * hash) + ENV_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvVariables().hashCode(); + } + hash = (37 * hash) + PYTHON_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getPythonVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.SoftwareConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.SoftwareConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.SoftwareConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.SoftwareConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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 configuration of software inside the environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.SoftwareConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.SoftwareConfig) + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetAirflowConfigOverrides(); + case 3: + return internalGetPypiPackages(); + case 4: + return internalGetEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableAirflowConfigOverrides(); + case 3: + return internalGetMutablePypiPackages(); + case 4: + return internalGetMutableEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.class, + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.Builder.class); + } + + // Construct using com.google.cloud.orchestration.airflow.service.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_ = ""; + + internalGetMutableAirflowConfigOverrides().clear(); + internalGetMutablePypiPackages().clear(); + internalGetMutableEnvVariables().clear(); + pythonVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_SoftwareConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig build() { + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig result = + new com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(this); + int from_bitField0_ = bitField0_; + result.imageVersion_ = imageVersion_; + result.airflowConfigOverrides_ = internalGetAirflowConfigOverrides(); + result.airflowConfigOverrides_.makeImmutable(); + result.pypiPackages_ = internalGetPypiPackages(); + result.pypiPackages_.makeImmutable(); + result.envVariables_ = internalGetEnvVariables(); + result.envVariables_.makeImmutable(); + result.pythonVersion_ = pythonVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.getDefaultInstance()) + return this; + if (!other.getImageVersion().isEmpty()) { + imageVersion_ = other.imageVersion_; + onChanged(); + } + internalGetMutableAirflowConfigOverrides() + .mergeFrom(other.internalGetAirflowConfigOverrides()); + internalGetMutablePypiPackages().mergeFrom(other.internalGetPypiPackages()); + internalGetMutableEnvVariables().mergeFrom(other.internalGetEnvVariables()); + if (!other.getPythonVersion().isEmpty()) { + pythonVersion_ = other.pythonVersion_; + 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.orchestration.airflow.service.v1.SoftwareConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object imageVersion_ = ""; + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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; + } + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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; + } + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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; + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageVersion() { + + imageVersion_ = getDefaultInstance().getImageVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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 + airflowConfigOverrides_; + + private com.google.protobuf.MapField + internalGetAirflowConfigOverrides() { + if (airflowConfigOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + } + return airflowConfigOverrides_; + } + + private com.google.protobuf.MapField + internalGetMutableAirflowConfigOverrides() { + onChanged(); + ; + if (airflowConfigOverrides_ == null) { + airflowConfigOverrides_ = + com.google.protobuf.MapField.newMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!airflowConfigOverrides_.isMutable()) { + airflowConfigOverrides_ = airflowConfigOverrides_.copy(); + } + return airflowConfigOverrides_; + } + + public int getAirflowConfigOverridesCount() { + return internalGetAirflowConfigOverrides().getMap().size(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public boolean containsAirflowConfigOverrides(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAirflowConfigOverrides().getMap().containsKey(key); + } + /** Use {@link #getAirflowConfigOverridesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAirflowConfigOverrides() { + return getAirflowConfigOverridesMap(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public java.util.Map getAirflowConfigOverridesMap() { + return internalGetAirflowConfigOverrides().getMap(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAirflowConfigOverrides() { + internalGetMutableAirflowConfigOverrides().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + public Builder removeAirflowConfigOverrides(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAirflowConfigOverrides().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAirflowConfigOverrides() { + return internalGetMutableAirflowConfigOverrides().getMutableMap(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + public Builder putAirflowConfigOverrides(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAirflowConfigOverrides().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + public Builder putAllAirflowConfigOverrides( + java.util.Map values) { + internalGetMutableAirflowConfigOverrides().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField pypiPackages_; + + private com.google.protobuf.MapField + internalGetPypiPackages() { + if (pypiPackages_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiPackagesDefaultEntryHolder.defaultEntry); + } + return pypiPackages_; + } + + private com.google.protobuf.MapField + internalGetMutablePypiPackages() { + onChanged(); + ; + if (pypiPackages_ == null) { + pypiPackages_ = + com.google.protobuf.MapField.newMapField(PypiPackagesDefaultEntryHolder.defaultEntry); + } + if (!pypiPackages_.isMutable()) { + pypiPackages_ = pypiPackages_.copy(); + } + return pypiPackages_; + } + + public int getPypiPackagesCount() { + return internalGetPypiPackages().getMap().size(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public boolean containsPypiPackages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiPackages().getMap().containsKey(key); + } + /** Use {@link #getPypiPackagesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiPackages() { + return getPypiPackagesMap(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public java.util.Map getPypiPackagesMap() { + return internalGetPypiPackages().getMap(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPypiPackages() { + internalGetMutablePypiPackages().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + public Builder removePypiPackages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiPackages().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePypiPackages() { + return internalGetMutablePypiPackages().getMutableMap(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + public Builder putPypiPackages(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiPackages().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3; + */ + public Builder putAllPypiPackages(java.util.Map values) { + internalGetMutablePypiPackages().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField envVariables_; + + private com.google.protobuf.MapField + internalGetEnvVariables() { + if (envVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + } + return envVariables_; + } + + private com.google.protobuf.MapField + internalGetMutableEnvVariables() { + onChanged(); + ; + if (envVariables_ == null) { + envVariables_ = + com.google.protobuf.MapField.newMapField(EnvVariablesDefaultEntryHolder.defaultEntry); + } + if (!envVariables_.isMutable()) { + envVariables_ = envVariables_.copy(); + } + return envVariables_; + } + + public int getEnvVariablesCount() { + return internalGetEnvVariables().getMap().size(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public boolean containsEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvVariables() { + return getEnvVariablesMap(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public java.util.Map getEnvVariablesMap() { + return internalGetEnvVariables().getMap(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvVariables() { + internalGetMutableEnvVariables().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + public Builder removeEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvVariables().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnvVariables() { + return internalGetMutableEnvVariables().getMutableMap(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + public Builder putEnvVariables(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvVariables().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4; + */ + public Builder putAllEnvVariables(java.util.Map values) { + internalGetMutableEnvVariables().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object pythonVersion_ = ""; + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6; + * + * @return The pythonVersion. + */ + public java.lang.String getPythonVersion() { + java.lang.Object ref = pythonVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pythonVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6; + * + * @return The bytes for pythonVersion. + */ + public com.google.protobuf.ByteString getPythonVersionBytes() { + java.lang.Object ref = pythonVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pythonVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6; + * + * @param value The pythonVersion to set. + * @return This builder for chaining. + */ + public Builder setPythonVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pythonVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6; + * + * @return This builder for chaining. + */ + public Builder clearPythonVersion() { + + pythonVersion_ = getDefaultInstance().getPythonVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6; + * + * @param value The bytes for pythonVersion to set. + * @return This builder for chaining. + */ + public Builder setPythonVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pythonVersion_ = 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.orchestration.airflow.service.v1.SoftwareConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.SoftwareConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.SoftwareConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/SoftwareConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/SoftwareConfigOrBuilder.java new file mode 100644 index 00000000..03201c71 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/SoftwareConfigOrBuilder.java @@ -0,0 +1,461 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface SoftwareConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.SoftwareConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @return The imageVersion. + */ + java.lang.String getImageVersion(); + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @return The bytes for imageVersion. + */ + com.google.protobuf.ByteString getImageVersionBytes(); + + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + int getAirflowConfigOverridesCount(); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + boolean containsAirflowConfigOverrides(java.lang.String key); + /** Use {@link #getAirflowConfigOverridesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAirflowConfigOverrides(); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + java.util.Map getAirflowConfigOverridesMap(); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + java.lang.String getAirflowConfigOverridesOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * map<string, string> airflow_config_overrides = 2; + */ + java.lang.String getAirflowConfigOverridesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + int getPypiPackagesCount(); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + boolean containsPypiPackages(java.lang.String key); + /** Use {@link #getPypiPackagesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPypiPackages(); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + java.util.Map getPypiPackagesMap(); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + java.lang.String getPypiPackagesOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3; + */ + java.lang.String getPypiPackagesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + int getEnvVariablesCount(); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + boolean containsEnvVariables(java.lang.String key); + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnvVariables(); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + java.util.Map getEnvVariablesMap(); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + java.lang.String getEnvVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4; + */ + java.lang.String getEnvVariablesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6; + * + * @return The pythonVersion. + */ + java.lang.String getPythonVersion(); + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6; + * + * @return The bytes for pythonVersion. + */ + com.google.protobuf.ByteString getPythonVersionBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/UpdateEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/UpdateEnvironmentRequest.java new file mode 100644 index 00000000..d87eef1b --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/UpdateEnvironmentRequest.java @@ -0,0 +1,2473 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Update an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} + */ +public final class UpdateEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + UpdateEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateEnvironmentRequest.newBuilder() to construct. + private UpdateEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateEnvironmentRequest( + 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.orchestration.airflow.service.v1.Environment.Builder subBuilder = + null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1.Environment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @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 ENVIRONMENT_FIELD_NUMBER = 1; + private com.google.cloud.orchestration.airflow.service.v1.Environment environment_; + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + return getEnvironment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * numpy, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.numpy". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and numpy will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field.
+   * * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current `WebServerNetworkAccessControl`.
+   * * `config.databaseConfig`
+   *     * Replace the environment's current `DatabaseConfig`.
+   * * `config.webServerConfig`
+   *     * Replace the environment's current `WebServerConfig`.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * numpy, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.numpy". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and numpy will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field.
+   * * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current `WebServerNetworkAccessControl`.
+   * * `config.databaseConfig`
+   *     * Replace the environment's current `DatabaseConfig`.
+   * * `config.webServerConfig`
+   *     * Replace the environment's current `WebServerConfig`.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * numpy, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.numpy". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and numpy will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field.
+   * * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current `WebServerNetworkAccessControl`.
+   * * `config.databaseConfig`
+   *     * Replace the environment's current `DatabaseConfig`.
+   * * `config.webServerConfig`
+   *     * Replace the environment's current `WebServerConfig`.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @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 (environment_ != null) { + output.writeMessage(1, getEnvironment()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnvironment()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.orchestration.airflow.service.v1.UpdateEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment().equals(other.getEnvironment())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().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.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Update an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + environmentBuilder_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_UpdateEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(this); + result.name_ = name_; + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.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.orchestration.airflow.service.v1.UpdateEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + 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.orchestration.airflow.service.v1.UpdateEnvironmentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return environmentBuilder_ != null || environment_ != null; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * + * @return The environment. + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + public Builder mergeEnvironment( + com.google.cloud.orchestration.airflow.service.v1.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.orchestration.airflow.service.v1.Environment.newBuilder(environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + public com.google.cloud.orchestration.airflow.service.v1.Environment.Builder + getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + public com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1.Environment.getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.Environment, + com.google.cloud.orchestration.airflow.service.v1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + 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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * numpy, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.numpy". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and numpy will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field.
+     * * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current `WebServerNetworkAccessControl`.
+     * * `config.databaseConfig`
+     *     * Replace the environment's current `DatabaseConfig`.
+     * * `config.webServerConfig`
+     *     * Replace the environment's current `WebServerConfig`.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + 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.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/UpdateEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/UpdateEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..944fecf6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/UpdateEnvironmentRequestOrBuilder.java @@ -0,0 +1,434 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface UpdateEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * + * @return The environment. + */ + com.google.cloud.orchestration.airflow.service.v1.Environment getEnvironment(); + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + com.google.cloud.orchestration.airflow.service.v1.EnvironmentOrBuilder getEnvironmentOrBuilder(); + + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * numpy, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.numpy". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and numpy will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field.
+   * * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current `WebServerNetworkAccessControl`.
+   * * `config.databaseConfig`
+   *     * Replace the environment's current `DatabaseConfig`.
+   * * `config.webServerConfig`
+   *     * Replace the environment's current `WebServerConfig`.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * numpy, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.numpy". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and numpy will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field.
+   * * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current `WebServerNetworkAccessControl`.
+   * * `config.databaseConfig`
+   *     * Replace the environment's current `DatabaseConfig`.
+   * * `config.webServerConfig`
+   *     * Replace the environment's current `WebServerConfig`.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * numpy, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.numpy". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and numpy will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field.
+   * * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current `WebServerNetworkAccessControl`.
+   * * `config.databaseConfig`
+   *     * Replace the environment's current `DatabaseConfig`.
+   * * `config.webServerConfig`
+   *     * Replace the environment's current `WebServerConfig`.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerConfig.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerConfig.java new file mode 100644 index 00000000..973888fe --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerConfig.java @@ -0,0 +1,681 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * The configuration settings for the Airflow web server App Engine instance.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.WebServerConfig} + */ +public final class WebServerConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.WebServerConfig) + WebServerConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebServerConfig.newBuilder() to construct. + private WebServerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WebServerConfig() { + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WebServerConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebServerConfig( + 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(); + + machineType_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.class, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1.WebServerConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig other = + (com.google.cloud.orchestration.airflow.service.v1.WebServerConfig) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.WebServerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.WebServerConfig) + com.google.cloud.orchestration.airflow.service.v1.WebServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.class, + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + machineType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig build() { + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig result = + new com.google.cloud.orchestration.airflow.service.v1.WebServerConfig(this); + result.machineType_ = machineType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1.WebServerConfig) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1.WebServerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.WebServerConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.WebServerConfig.getDefaultInstance()) + return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + 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.orchestration.airflow.service.v1.WebServerConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.WebServerConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.WebServerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.WebServerConfig) + private static final com.google.cloud.orchestration.airflow.service.v1.WebServerConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebServerConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerConfigOrBuilder.java new file mode 100644 index 00000000..88067c39 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerConfigOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface WebServerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.WebServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerNetworkAccessControl.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerNetworkAccessControl.java new file mode 100644 index 00000000..c9453c58 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerNetworkAccessControl.java @@ -0,0 +1,2086 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +/** + * + * + *
+ * Network-level access control policy for the Airflow web server.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} + */ +public final class WebServerNetworkAccessControl extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + WebServerNetworkAccessControlOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebServerNetworkAccessControl.newBuilder() to construct. + private WebServerNetworkAccessControl(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WebServerNetworkAccessControl() { + allowedIpRanges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WebServerNetworkAccessControl(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebServerNetworkAccessControl( + 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)) { + allowedIpRanges_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControl.AllowedIpRange>(); + mutable_bitField0_ |= 0x00000001; + } + allowedIpRanges_.add( + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControl.AllowedIpRange.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)) { + allowedIpRanges_ = java.util.Collections.unmodifiableList(allowedIpRanges_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.class, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.Builder + .class); + } + + public interface AllowedIpRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+     * Optional. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Optional. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + } + /** + * + * + *
+   * Allowed IP range with user-provided description.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} + */ + public static final class AllowedIpRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + AllowedIpRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllowedIpRange.newBuilder() to construct. + private AllowedIpRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AllowedIpRange() { + value_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AllowedIpRange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AllowedIpRange( + 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(); + + value_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = 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.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.class, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Optional. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + other = + (com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange) + obj; + + if (!getValue().equals(other.getValue())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Allowed IP range with user-provided description.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.class, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + build() { + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + result = + new com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange(this); + result.value_ = value_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance()) return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Optional. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + private static final com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControl.AllowedIpRange + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowedIpRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllowedIpRange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALLOWED_IP_RANGES_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange> + allowedIpRanges_; + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange> + getAllowedIpRangesList() { + return allowedIpRanges_; + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesOrBuilderList() { + return allowedIpRanges_; + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public int getAllowedIpRangesCount() { + return allowedIpRanges_.size(); + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + getAllowedIpRanges(int index) { + return allowedIpRanges_.get(index); + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder + getAllowedIpRangesOrBuilder(int index) { + return allowedIpRanges_.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 < allowedIpRanges_.size(); i++) { + output.writeMessage(1, allowedIpRanges_.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 < allowedIpRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, allowedIpRanges_.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.orchestration.airflow.service.v1.WebServerNetworkAccessControl)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl other = + (com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) obj; + + if (!getAllowedIpRangesList().equals(other.getAllowedIpRangesList())) return false; + if (!unknownFields.equals(other.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 (getAllowedIpRangesCount() > 0) { + hash = (37 * hash) + ALLOWED_IP_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIpRangesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network-level access control policy for the Airflow web server.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.class, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedIpRangesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (allowedIpRangesBuilder_ == null) { + allowedIpRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedIpRangesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1_WebServerNetworkAccessControl_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl build() { + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl result = + new com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(this); + int from_bitField0_ = bitField0_; + if (allowedIpRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedIpRanges_ = java.util.Collections.unmodifiableList(allowedIpRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedIpRanges_ = allowedIpRanges_; + } else { + result.allowedIpRanges_ = allowedIpRangesBuilder_.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.orchestration.airflow.service.v1.WebServerNetworkAccessControl) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .getDefaultInstance()) return this; + if (allowedIpRangesBuilder_ == null) { + if (!other.allowedIpRanges_.isEmpty()) { + if (allowedIpRanges_.isEmpty()) { + allowedIpRanges_ = other.allowedIpRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.addAll(other.allowedIpRanges_); + } + onChanged(); + } + } else { + if (!other.allowedIpRanges_.isEmpty()) { + if (allowedIpRangesBuilder_.isEmpty()) { + allowedIpRangesBuilder_.dispose(); + allowedIpRangesBuilder_ = null; + allowedIpRanges_ = other.allowedIpRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedIpRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedIpRangesFieldBuilder() + : null; + } else { + allowedIpRangesBuilder_.addAllMessages(other.allowedIpRanges_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange> + allowedIpRanges_ = java.util.Collections.emptyList(); + + private void ensureAllowedIpRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedIpRanges_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange>(allowedIpRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + allowedIpRangesBuilder_; + + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange> + getAllowedIpRangesList() { + if (allowedIpRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedIpRanges_); + } else { + return allowedIpRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public int getAllowedIpRangesCount() { + if (allowedIpRangesBuilder_ == null) { + return allowedIpRanges_.size(); + } else { + return allowedIpRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + getAllowedIpRanges(int index) { + if (allowedIpRangesBuilder_ == null) { + return allowedIpRanges_.get(index); + } else { + return allowedIpRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder setAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + value) { + if (allowedIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.set(index, value); + onChanged(); + } else { + allowedIpRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder setAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + builderForValue) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedIpRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + value) { + if (allowedIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(value); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange + value) { + if (allowedIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(index, value); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + builderForValue) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(builderForValue.build()); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + builderForValue) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllAllowedIpRanges( + java.lang.Iterable< + ? extends + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange> + values) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedIpRanges_); + onChanged(); + } else { + allowedIpRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder clearAllowedIpRanges() { + if (allowedIpRangesBuilder_ == null) { + allowedIpRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedIpRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder removeAllowedIpRanges(int index) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.remove(index); + onChanged(); + } else { + allowedIpRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + getAllowedIpRangesBuilder(int index) { + return getAllowedIpRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder + getAllowedIpRangesOrBuilder(int index) { + if (allowedIpRangesBuilder_ == null) { + return allowedIpRanges_.get(index); + } else { + return allowedIpRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesOrBuilderList() { + if (allowedIpRangesBuilder_ != null) { + return allowedIpRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedIpRanges_); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + addAllowedIpRangesBuilder() { + return getAllowedIpRangesFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + addAllowedIpRangesBuilder(int index) { + return getAllowedIpRangesFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder> + getAllowedIpRangesBuilderList() { + return getAllowedIpRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesFieldBuilder() { + if (allowedIpRangesBuilder_ == null) { + allowedIpRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange.Builder, + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder>( + allowedIpRanges_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedIpRanges_ = null; + } + return allowedIpRangesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + private static final com.google.cloud.orchestration.airflow.service.v1 + .WebServerNetworkAccessControl + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); + } + + public static com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebServerNetworkAccessControl parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebServerNetworkAccessControl(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerNetworkAccessControlOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerNetworkAccessControlOrBuilder.java new file mode 100644 index 00000000..97dc6563 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/java/com/google/cloud/orchestration/airflow/service/v1/WebServerNetworkAccessControlOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1; + +public interface WebServerNetworkAccessControlOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + java.util.List< + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRange> + getAllowedIpRangesList(); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + getAllowedIpRanges(int index); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + int getAllowedIpRangesCount(); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesOrBuilderList(); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder + getAllowedIpRangesOrBuilder(int index); +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto b/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto new file mode 100644 index 00000000..0579d51a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -0,0 +1,730 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Managed Apache Airflow Environments. +service Environments { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new environment. + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Get an existing environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List environments. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an environment. + rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "name,environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Delete an environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } +} + +// Create a new environment. +message CreateEnvironmentRequest { + // The parent must be of the form + // "projects/{projectId}/locations/{locationId}". + string parent = 1; + + // The environment to create. + Environment environment = 2; +} + +// Get an environment. +message GetEnvironmentRequest { + // The resource name of the environment to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// List environments in a project and location. +message ListEnvironmentsRequest { + // List environments in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of environments to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The environments in a project and location. +message ListEnvironmentsResponse { + // The list of environments returned by a ListEnvironmentsRequest. + repeated Environment environments = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Delete an environment. +message DeleteEnvironmentRequest { + // The environment to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Update an environment. +message UpdateEnvironmentRequest { + // The relative resource name of the environment to update, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 2; + + // A patch environment. Fields specified by the `updateMask` will be copied + // from the patch environment into the environment under update. + Environment environment = 1; + + // Required. A comma-separated list of paths, relative to `Environment`, of + // fields to update. + // For example, to set the version of scikit-learn to install in the + // environment to 0.19.0 and to remove an existing installation of + // numpy, the `updateMask` parameter would include the following two + // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + // "config.softwareConfig.pypiPackages.numpy". The included patch + // environment would specify the scikit-learn version as follows: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "scikit-learn":"==0.19.0" + // } + // } + // } + // } + // + // Note that in the above example, any existing PyPI packages + // other than scikit-learn and numpy will be unaffected. + // + // Only one update type may be included in a single request's `updateMask`. + // For example, one cannot update both the PyPI packages and + // labels in the same request. However, it is possible to update multiple + // members of a map field simultaneously in the same request. For example, + // to set the labels "label1" and "label2" while clearing "label3" (assuming + // it already exists), one can + // provide the paths "labels.label1", "labels.label2", and "labels.label3" + // and populate the patch environment as follows: + // + // { + // "labels":{ + // "label1":"new-label1-value" + // "label2":"new-label2-value" + // } + // } + // + // Note that in the above example, any existing labels that are not + // included in the `updateMask` will be unaffected. + // + // It is also possible to replace an entire map field by providing the + // map field's path in the `updateMask`. The new value of the field will + // be that which is provided in the patch environment. For example, to + // delete all pre-existing user-specified PyPI packages and + // install botocore at version 1.7.14, the `updateMask` would contain + // the path "config.softwareConfig.pypiPackages", and + // the patch environment would be the following: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "botocore":"==1.7.14" + // } + // } + // } + // } + // + // **Note:** Only the following fields can be updated: + // + // * `config.softwareConfig.pypiPackages` + // * Replace all custom custom PyPI packages. If a replacement + // package map is not included in `environment`, all custom + // PyPI packages are cleared. It is an error to provide both + // this mask and a mask specifying an individual package. + // * `config.softwareConfig.pypiPackages.`packagename + // * Update the custom PyPI package *packagename*, + // preserving other packages. To delete the package, include it in + // `updateMask`, and omit the mapping for it in + // `environment.config.softwareConfig.pypiPackages`. It is an error + // to provide both a mask of this form and the + // `config.softwareConfig.pypiPackages` mask. + // * `labels` + // * Replace all environment labels. If a replacement labels map is not + // included in `environment`, all labels are cleared. It is an error to + // provide both this mask and a mask specifying one or more individual + // labels. + // * `labels.`labelName + // * Set the label named *labelName*, while preserving other + // labels. To delete the label, include it in `updateMask` and omit its + // mapping in `environment.labels`. It is an error to provide both a + // mask of this form and the `labels` mask. + // * `config.nodeCount` + // * Horizontally scale the number of nodes in the environment. An integer + // greater than or equal to 3 must be provided in the `config.nodeCount` + // field. + // * `config.webServerNetworkAccessControl` + // * Replace the environment's current `WebServerNetworkAccessControl`. + // * `config.databaseConfig` + // * Replace the environment's current `DatabaseConfig`. + // * `config.webServerConfig` + // * Replace the environment's current `WebServerConfig`. + // * `config.softwareConfig.airflowConfigOverrides` + // * Replace all Apache Airflow config overrides. If a replacement config + // overrides map is not included in `environment`, all config overrides + // are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual config overrides. + // * `config.softwareConfig.airflowConfigOverrides.`section-name + // * Override the Apache Airflow config property *name* in the + // section named *section*, preserving other properties. To + // delete the property override, include it in `updateMask` and omit its + // mapping in + // `environment.config.softwareConfig.airflowConfigOverrides`. + // It is an error to provide both a mask of this form and the + // `config.softwareConfig.airflowConfigOverrides` mask. + // * `config.softwareConfig.envVariables` + // * Replace all environment variables. If a replacement environment + // variable map is not included in `environment`, all custom environment + // variables are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual environment variables. + google.protobuf.FieldMask update_mask = 3; +} + +// Configuration information for an environment. +message EnvironmentConfig { + // Output only. The Kubernetes Engine cluster used to run this environment. + string gke_cluster = 1; + + // Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud + // Storage objects reside in a flat namespace, a hierarchical file tree + // can be simulated using "/"-delimited object name prefixes. DAG objects for + // this environment reside in a simulated directory with the given prefix. + string dag_gcs_prefix = 2; + + // The number of nodes in the Kubernetes Engine cluster that will be + // used to run this environment. + int32 node_count = 3; + + // The configuration settings for software inside the environment. + SoftwareConfig software_config = 4; + + // The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5; + + // The configuration used for the Private IP Cloud Composer environment. + PrivateEnvironmentConfig private_environment_config = 7; + + // Optional. The network-level access control policy for the Airflow web server. If + // unspecified, no network-level access restrictions will be applied. + WebServerNetworkAccessControl web_server_network_access_control = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for Cloud SQL instance used internally by Apache + // Airflow software. + DatabaseConfig database_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for the Airflow web server App Engine instance. + WebServerConfig web_server_config = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The encryption options for the Cloud Composer environment + // and its dependencies. Cannot be updated. + EncryptionConfig encryption_config = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI of the Apache Airflow Web UI hosted within this environment (see + // [Airflow web + // interface](/composer/docs/how-to/accessing/airflow-web-interface)). + string airflow_uri = 6; +} + +// Network-level access control policy for the Airflow web server. +message WebServerNetworkAccessControl { + // Allowed IP range with user-provided description. + message AllowedIpRange { + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // IP range prefixes should be properly truncated. For example, + // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + // `2001:db8::1/32` should be truncated to `2001:db8::/32`. + string value = 1; + + // Optional. User-provided description. It must contain at most 300 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // A collection of allowed IP ranges with descriptions. + repeated AllowedIpRange allowed_ip_ranges = 1; +} + +// The configuration of Cloud SQL instance that is used by the Apache Airflow +// software. +message DatabaseConfig { + // Optional. Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for the Airflow web server App Engine instance. +message WebServerConfig { + // Optional. Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + // composer-n1-webserver-8. + // If not specified, composer-n1-webserver-2 will be used. + // Value custom is returned only in response, if Airflow web server parameters + // were manually changed to a non-standard values. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The encryption options for the Cloud Composer environment +// and its dependencies. +message EncryptionConfig { + // Optional. Customer-managed Encryption Key available through Google's Key Management + // Service. Cannot be updated. + // If not specified, Google-managed key will be used. + string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Specifies the selection and configuration of software inside the environment. +message SoftwareConfig { + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the version is a + // [semantic version](https://semver.org) or `latest`. When the patch version + // is omitted, the current Cloud Composer patch version is selected. + // When `latest` is provided instead of an explicit version number, + // the server replaces `latest` with the current Cloud Composer version + // and stores that version number in the same field. + // + // The portion of the image version that follows *airflow-* is an + // official Apache Airflow repository + // [release name](https://github.com/apache/incubator-airflow/releases). + // + // See also [Version + // List](/composer/docs/concepts/versioning/composer-versions). + string image_version = 1; + + // Optional. Apache Airflow configuration properties to override. + // + // Property keys contain the section and property names, separated by a + // hyphen, for example "core-dags_are_paused_at_creation". Section names must + // not contain hyphens ("-"), opening square brackets ("["), or closing + // square brackets ("]"). The property name must not be empty and must not + // contain an equals sign ("=") or semicolon (";"). Section and property names + // must not contain a period ("."). Apache Airflow configuration property + // names must be written in + // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + // contain any character, and can be written in any lower/upper case format. + // + // Certain Apache Airflow configuration property values are + // [blocked](/composer/docs/concepts/airflow-configurations), + // and cannot be overridden. + map airflow_config_overrides = 2; + + // Optional. Custom Python Package Index (PyPI) packages to be installed in + // the environment. + // + // Keys refer to the lowercase package name such as "numpy" + // and values are the lowercase extras and version specifier such as + // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + // package without pinning it to a version specifier, use the empty string as + // the value. + map pypi_packages = 3; + + // Optional. Additional environment variables to provide to the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Environment variable names must match the regular expression + // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + // software configuration overrides (they cannot match the regular expression + // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + // following reserved names: + // + // * `AIRFLOW_HOME` + // * `C_FORCE_ROOT` + // * `CONTAINER_NAME` + // * `DAGS_FOLDER` + // * `GCP_PROJECT` + // * `GCS_BUCKET` + // * `GKE_CLUSTER_NAME` + // * `SQL_DATABASE` + // * `SQL_INSTANCE` + // * `SQL_PASSWORD` + // * `SQL_PROJECT` + // * `SQL_REGION` + // * `SQL_USER` + map env_variables = 4; + + // Optional. The major version of Python used to run the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + // updated. + string python_version = 6; +} + +// Configuration for controlling how IPs are allocated in the +// GKE cluster running the Apache Airflow software. +message IPAllocationPolicy { + // Optional. Whether or not to enable Alias IPs in the GKE cluster. + // If `true`, a VPC-native cluster is created. + bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Configuration of allocating IP addresses for pods in the GKE cluster. + oneof cluster_ip_allocation { + // Optional. The name of the GKE cluster's secondary range used to allocate + // IP addresses to pods. + // + // This field is applicable only when `use_ip_aliases` is true. + string cluster_secondary_range_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range used to allocate IP addresses to pods in + // the GKE cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration of allocating IP addresses for services in the GKE cluster. + oneof services_ip_allocation { + // Optional. The name of the services' secondary range used to allocate + // IP addresses to the GKE cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + string services_secondary_range_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range of the services IP addresses in this + // GKE cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// The configuration information for the Kubernetes Engine nodes running +// the Apache Airflow software. +message NodeConfig { + // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + // to deploy the VMs used to run the Apache Airflow software, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}". + // + // This `location` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.machineType` are specified, + // `nodeConfig.machineType` must belong to this `location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If only one field (`location` or `nodeConfig.machineType`) is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + string location = 1; + + // Optional. The Compute Engine + // [machine type](/compute/docs/machine-types) used for cluster instances, + // specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + // + // The `machineType` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.location` are specified, + // this `machineType` must belong to the `nodeConfig.location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If exactly one of this field and `nodeConfig.location` is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // The `machineTypeId` must not be a [shared-core machine + // type](/compute/docs/machine-types#sharedcore). + // + // If this field is unspecified, the `machineTypeId` defaults + // to "n1-standard-1". + string machine_type = 2; + + // Optional. The Compute Engine network to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/global/networks/{networkId}". + // + // If unspecified, the "default" network ID in the environment's project is + // used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // is provided, `nodeConfig.subnetwork` must also be provided. For + // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + // `nodeConfig.subnetwork`. + string network = 3; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + // + // If a subnetwork is provided, `nodeConfig.network` must also be provided, + // and the subnetwork must belong to the enclosing environment's project and + // location. + string subnetwork = 4; + + // Optional. The disk size in GB used for node VMs. Minimum size is 20GB. + // If unspecified, defaults to 100GB. Cannot be updated. + int32 disk_size_gb = 5; + + // Optional. The set of Google API scopes to be made available on all + // node VMs. If `oauth_scopes` is empty, defaults to + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + repeated string oauth_scopes = 6; + + // Optional. The Google Cloud Platform Service Account to be used by the node + // VMs. If a service account is not specified, the "default" Compute Engine + // service account is used. Cannot be updated. + string service_account = 7; + + // Optional. The list of instance tags applied to all node VMs. Tags are used + // to identify valid sources or targets for network firewalls. Each tag within + // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + // Cannot be updated. + repeated string tags = 8; + + // Optional. The configuration for controlling how IPs are allocated in the GKE cluster. + IPAllocationPolicy ip_allocation_policy = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the private GKE cluster in a Cloud Composer +// environment. +message PrivateClusterConfig { + // Optional. If `true`, access to the public endpoint of the GKE cluster is + // denied. + bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If + // left blank, the default value of '172.16.0.0/23' is used. + string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range in CIDR notation to use for the hosted master network. This + // range is used for assigning internal IP addresses to the GKE cluster + // master or set of masters and to the internal load balancer virtual IP. + // This range must not overlap with any other ranges in use + // within the cluster's network. + string master_ipv4_reserved_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The configuration information for configuring a Private IP Cloud Composer +// environment. +message PrivateEnvironmentConfig { + // Optional. If `true`, a Private IP Cloud Composer environment is created. + // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + // set to true. + bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the private GKE cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig private_cluster_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range for web server will be reserved. Needs + // to be disjoint from `private_cluster_config.master_ipv4_cidr_block` and + // `cloud_sql_ipv4_cidr_block`. + string web_server_ipv4_cidr_block = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range in tenant project will be reserved for + // Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`. + string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's App Engine VMs. + string web_server_ipv4_reserved_range = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An environment for running orchestration tasks. +message Environment { + option (google.api.resource) = { + type: "composer.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/environments/{environment}" + }; + + // State of the environment. + enum State { + // The state of the environment is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being created. + CREATING = 1; + + // The environment is currently running and healthy. It is ready for use. + RUNNING = 2; + + // The environment is being updated. It remains usable but cannot receive + // additional update requests or be deleted at this time. + UPDATING = 3; + + // The environment is undergoing deletion. It cannot be used. + DELETING = 4; + + // The environment has encountered an error and cannot be used. + ERROR = 5; + } + + // The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + // + // EnvironmentId must start with a lowercase letter followed by up to 63 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string name = 1; + + // Configuration parameters for this environment. + EnvironmentConfig config = 2; + + // Output only. The UUID (Universally Unique IDentifier) associated with this environment. + // This value is generated when the environment is created. + string uuid = 3; + + // The current state of the environment. + State state = 4; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time at which this environment was last modified. + google.protobuf.Timestamp update_time = 6; + + // Optional. User-defined labels for this environment. + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + map labels = 7; +} + +// Message containing information about the result of an upgrade check +// operation. +message CheckUpgradeResponse { + // Whether there were python modules conflict during image build. + enum ConflictResult { + // It is unknown whether build had conflicts or not. + CONFLICT_RESULT_UNSPECIFIED = 0; + + // There were python packages conflicts. + CONFLICT = 1; + + // There were no python packages conflicts. + NO_CONFLICT = 2; + } + + // Output only. Url for a docker build log of an upgraded image. + string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether build has succeeded or failed on modules conflicts. + ConflictResult contains_pypi_modules_conflict = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extract from a docker image build log containing information about pypi + // modules conflicts. + string pypi_conflict_build_log_extract = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Composer image for which the build was happening. + string image_version = 5; + + // Pypi dependencies specified in the environment configuration, at the time + // when the build was triggered. + map pypi_dependencies = 6; +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/image_versions.proto b/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/image_versions.proto new file mode 100644 index 00000000..ea65c8d8 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/image_versions.proto @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Readonly service to query available ImageVersions. +service ImageVersions { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // List ImageVersions for provided location. + rpc ListImageVersions(ListImageVersionsRequest) returns (ListImageVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/imageVersions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List ImageVersions in a project and location. +message ListImageVersionsRequest { + // List ImageVersions in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of image_versions to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Whether or not image versions from old releases should be included. + bool include_past_releases = 4; +} + +// The ImageVersions in a project and location. +message ListImageVersionsResponse { + // The list of supported ImageVersions in a location. + repeated ImageVersion image_versions = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// ImageVersion information +message ImageVersion { + // The string identifier of the ImageVersion, in the form: + // "composer-x.y.z-airflow-a.b(.c)" + string image_version_id = 1; + + // Whether this is the default ImageVersion used by Composer during + // environment creation if no input ImageVersion is specified. + bool is_default = 2; + + // supported python versions + repeated string supported_python_versions = 3; + + // The date of the version release. + google.type.Date release_date = 4; + + // Whether it is impossible to create an environment with the image version. + bool creation_disabled = 5; + + // Whether it is impossible to upgrade an environment running with the image + // version. + bool upgrade_disabled = 6; +} diff --git a/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto b/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto new file mode 100644 index 00000000..5d452fd5 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1/src/main/proto/google/cloud/orchestration/airflow/service/v1/operations.proto @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1;service"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Metadata describing an operation. +message OperationMetadata { + // An enum describing the overall state of an operation. + enum State { + option allow_alias = true; + + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCEEDED = 3; + + SUCCESSFUL = 3; + + // The operation is no longer running but did not succeed. + FAILED = 4; + } + + // Type of longrunning operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // A resource creation operation. + CREATE = 1; + + // A resource deletion operation. + DELETE = 2; + + // A resource update operation. + UPDATE = 3; + + // A resource check operation. + CHECK = 4; + } + + // Output only. The current operation state. + State state = 1; + + // Output only. The type of operation being performed. + Type operation_type = 2; + + // Output only. The resource being operated on, as a [relative resource name]( + // /apis/design/resource_names#relative_resource_name). + string resource = 3; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4; + + // Output only. The time the operation was submitted to the server. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time when the operation terminated, regardless of its success. + // This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6; +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-orchestration-airflow-v1beta1/clirr-ignored-differences.xml new file mode 100644 index 00000000..25a98f2a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/clirr-ignored-differences.xml @@ -0,0 +1,19 @@ + + + + + 7012 + com/google/cloud/orchestration/airflow/service/v1beta1/*OrBuilder + * get*(*) + + + 7012 + com/google/cloud/orchestration/airflow/service/v1beta1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/cloud/orchestration/airflow/service/v1beta1/*OrBuilder + boolean has*(*) + + diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml b/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml new file mode 100644 index 00000000..4682cff1 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-orchestration-airflow-v1beta1 + 0.0.1-SNAPSHOT + proto-google-cloud-orchestration-airflow-v1beta1 + Proto library for google-cloud-orchestration-airflow + + com.google.cloud + google-cloud-orchestration-airflow-parent + 0.0.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeRequest.java new file mode 100644 index 00000000..f944b7c5 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeRequest.java @@ -0,0 +1,966 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Request to check whether image upgrade will succeed.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} + */ +public final class CheckUpgradeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + CheckUpgradeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckUpgradeRequest.newBuilder() to construct. + private CheckUpgradeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CheckUpgradeRequest() { + environment_ = ""; + imageVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckUpgradeRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckUpgradeRequest( + 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(); + + environment_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageVersion_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.Builder + .class); + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object environment_; + /** + * + * + *
+   * The resource name of the environment to check upgrade for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment to check upgrade for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object imageVersion_; + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows `airflow-` is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version List]
+   * (/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 2; + * + * @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; + } + } + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows `airflow-` is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version List]
+   * (/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 2; + * + * @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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!getImageVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageVersion_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!getImageVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) obj; + + if (!getEnvironment().equals(other.getEnvironment())) return false; + if (!getImageVersion().equals(other.getImageVersion())) return false; + if (!unknownFields.equals(other.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) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + IMAGE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getImageVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 check whether image upgrade will succeed.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + environment_ = ""; + + imageVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(this); + result.environment_ = environment_; + result.imageVersion_ = imageVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + .getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (!other.getImageVersion().isEmpty()) { + imageVersion_ = other.imageVersion_; + 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.orchestration.airflow.service.v1beta1.CheckUpgradeRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object environment_ = ""; + /** + * + * + *
+     * The resource name of the environment to check upgrade for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The environment. + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to check upgrade for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + public com.google.protobuf.ByteString getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to check upgrade for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to check upgrade for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to check upgrade for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string environment = 1; + * + * @param value The bytes for environment to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageVersion_ = ""; + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows `airflow-` is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version List]
+     * (/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 2; + * + * @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; + } + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows `airflow-` is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version List]
+     * (/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 2; + * + * @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; + } + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows `airflow-` is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version List]
+     * (/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 2; + * + * @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; + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows `airflow-` is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version List]
+     * (/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 2; + * + * @return This builder for chaining. + */ + public Builder clearImageVersion() { + + imageVersion_ = getDefaultInstance().getImageVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows `airflow-` is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version List]
+     * (/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 2; + * + * @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; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckUpgradeRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CheckUpgradeRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeRequestOrBuilder.java new file mode 100644 index 00000000..1323c904 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface CheckUpgradeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment to check upgrade for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The environment. + */ + java.lang.String getEnvironment(); + /** + * + * + *
+   * The resource name of the environment to check upgrade for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string environment = 1; + * + * @return The bytes for environment. + */ + com.google.protobuf.ByteString getEnvironmentBytes(); + + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows `airflow-` is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version List]
+   * (/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 2; + * + * @return The imageVersion. + */ + java.lang.String getImageVersion(); + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows `airflow-` is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version List]
+   * (/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 2; + * + * @return The bytes for imageVersion. + */ + com.google.protobuf.ByteString getImageVersionBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeResponse.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeResponse.java new file mode 100644 index 00000000..6687403a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeResponse.java @@ -0,0 +1,1738 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Message containing information about the result of an upgrade check
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} + */ +public final class CheckUpgradeResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + CheckUpgradeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckUpgradeResponse.newBuilder() to construct. + private CheckUpgradeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CheckUpgradeResponse() { + buildLogUri_ = ""; + containsPypiModulesConflict_ = 0; + pypiConflictBuildLogExtract_ = ""; + imageVersion_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckUpgradeResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckUpgradeResponse( + 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(); + + buildLogUri_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pypiConflictBuildLogExtract_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + containsPypiModulesConflict_ = rawValue; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageVersion_ = s; + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pypiDependencies_ = + com.google.protobuf.MapField.newMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry pypiDependencies__ = + input.readMessage( + PypiDependenciesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + pypiDependencies_ + .getMutableMap() + .put(pypiDependencies__.getKey(), pypiDependencies__.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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetPypiDependencies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.Builder + .class); + } + + /** + * + * + *
+   * Whether there were python modules conflict during image build.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult} + */ + public enum ConflictResult implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * It is unknown whether build had conflicts or not.
+     * 
+ * + * CONFLICT_RESULT_UNSPECIFIED = 0; + */ + CONFLICT_RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * There were python packages conflicts.
+     * 
+ * + * CONFLICT = 1; + */ + CONFLICT(1), + /** + * + * + *
+     * There were no python packages conflicts.
+     * 
+ * + * NO_CONFLICT = 2; + */ + NO_CONFLICT(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * It is unknown whether build had conflicts or not.
+     * 
+ * + * CONFLICT_RESULT_UNSPECIFIED = 0; + */ + public static final int CONFLICT_RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * There were python packages conflicts.
+     * 
+ * + * CONFLICT = 1; + */ + public static final int CONFLICT_VALUE = 1; + /** + * + * + *
+     * There were no python packages conflicts.
+     * 
+ * + * NO_CONFLICT = 2; + */ + public static final int NO_CONFLICT_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 ConflictResult 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 ConflictResult forNumber(int value) { + switch (value) { + case 0: + return CONFLICT_RESULT_UNSPECIFIED; + case 1: + return CONFLICT; + case 2: + return NO_CONFLICT; + 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 ConflictResult findValueByNumber(int number) { + return ConflictResult.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.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ConflictResult[] VALUES = values(); + + public static ConflictResult 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 ConflictResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult) + } + + public static final int BUILD_LOG_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object buildLogUri_; + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildLogUri. + */ + @java.lang.Override + public java.lang.String getBuildLogUri() { + java.lang.Object ref = buildLogUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildLogUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildLogUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBuildLogUriBytes() { + java.lang.Object ref = buildLogUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildLogUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINS_PYPI_MODULES_CONFLICT_FIELD_NUMBER = 4; + private int containsPypiModulesConflict_; + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for containsPypiModulesConflict. + */ + @java.lang.Override + public int getContainsPypiModulesConflictValue() { + return containsPypiModulesConflict_; + } + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The containsPypiModulesConflict. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + getContainsPypiModulesConflict() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + result = + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .ConflictResult.valueOf(containsPypiModulesConflict_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + .UNRECOGNIZED + : result; + } + + public static final int PYPI_CONFLICT_BUILD_LOG_EXTRACT_FIELD_NUMBER = 3; + private volatile java.lang.Object pypiConflictBuildLogExtract_; + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pypiConflictBuildLogExtract. + */ + @java.lang.Override + public java.lang.String getPypiConflictBuildLogExtract() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pypiConflictBuildLogExtract_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pypiConflictBuildLogExtract. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPypiConflictBuildLogExtractBytes() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pypiConflictBuildLogExtract_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_VERSION_FIELD_NUMBER = 5; + private volatile java.lang.Object imageVersion_; + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @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; + } + } + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @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 PYPI_DEPENDENCIES_FIELD_NUMBER = 6; + + private static final class PypiDependenciesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField pypiDependencies_; + + private com.google.protobuf.MapField + internalGetPypiDependencies() { + if (pypiDependencies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + } + return pypiDependencies_; + } + + public int getPypiDependenciesCount() { + return internalGetPypiDependencies().getMap().size(); + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public boolean containsPypiDependencies(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiDependencies().getMap().containsKey(key); + } + /** Use {@link #getPypiDependenciesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiDependencies() { + return getPypiDependenciesMap(); + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.util.Map getPypiDependenciesMap() { + return internalGetPypiDependencies().getMap(); + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiDependencies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiDependencies().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 (!getBuildLogUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, buildLogUri_); + } + if (!getPypiConflictBuildLogExtractBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pypiConflictBuildLogExtract_); + } + if (containsPypiModulesConflict_ + != com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .ConflictResult.CONFLICT_RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, containsPypiModulesConflict_); + } + if (!getImageVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, imageVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetPypiDependencies(), PypiDependenciesDefaultEntryHolder.defaultEntry, 6); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBuildLogUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, buildLogUri_); + } + if (!getPypiConflictBuildLogExtractBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pypiConflictBuildLogExtract_); + } + if (containsPypiModulesConflict_ + != com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .ConflictResult.CONFLICT_RESULT_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(4, containsPypiModulesConflict_); + } + if (!getImageVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, imageVersion_); + } + for (java.util.Map.Entry entry : + internalGetPypiDependencies().getMap().entrySet()) { + com.google.protobuf.MapEntry pypiDependencies__ = + PypiDependenciesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, pypiDependencies__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse other = + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) obj; + + if (!getBuildLogUri().equals(other.getBuildLogUri())) return false; + if (containsPypiModulesConflict_ != other.containsPypiModulesConflict_) return false; + if (!getPypiConflictBuildLogExtract().equals(other.getPypiConflictBuildLogExtract())) + return false; + if (!getImageVersion().equals(other.getImageVersion())) return false; + if (!internalGetPypiDependencies().equals(other.internalGetPypiDependencies())) return false; + if (!unknownFields.equals(other.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) + BUILD_LOG_URI_FIELD_NUMBER; + hash = (53 * hash) + getBuildLogUri().hashCode(); + hash = (37 * hash) + CONTAINS_PYPI_MODULES_CONFLICT_FIELD_NUMBER; + hash = (53 * hash) + containsPypiModulesConflict_; + hash = (37 * hash) + PYPI_CONFLICT_BUILD_LOG_EXTRACT_FIELD_NUMBER; + hash = (53 * hash) + getPypiConflictBuildLogExtract().hashCode(); + hash = (37 * hash) + IMAGE_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getImageVersion().hashCode(); + if (!internalGetPypiDependencies().getMap().isEmpty()) { + hash = (37 * hash) + PYPI_DEPENDENCIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetPypiDependencies().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Message containing information about the result of an upgrade check
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 6: + return internalGetPypiDependencies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 6: + return internalGetMutablePypiDependencies(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + buildLogUri_ = ""; + + containsPypiModulesConflict_ = 0; + + pypiConflictBuildLogExtract_ = ""; + + imageVersion_ = ""; + + internalGetMutablePypiDependencies().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse build() { + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse result = + new com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(this); + int from_bitField0_ = bitField0_; + result.buildLogUri_ = buildLogUri_; + result.containsPypiModulesConflict_ = containsPypiModulesConflict_; + result.pypiConflictBuildLogExtract_ = pypiConflictBuildLogExtract_; + result.imageVersion_ = imageVersion_; + result.pypiDependencies_ = internalGetPypiDependencies(); + result.pypiDependencies_.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.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .getDefaultInstance()) return this; + if (!other.getBuildLogUri().isEmpty()) { + buildLogUri_ = other.buildLogUri_; + onChanged(); + } + if (other.containsPypiModulesConflict_ != 0) { + setContainsPypiModulesConflictValue(other.getContainsPypiModulesConflictValue()); + } + if (!other.getPypiConflictBuildLogExtract().isEmpty()) { + pypiConflictBuildLogExtract_ = other.pypiConflictBuildLogExtract_; + onChanged(); + } + if (!other.getImageVersion().isEmpty()) { + imageVersion_ = other.imageVersion_; + onChanged(); + } + internalGetMutablePypiDependencies().mergeFrom(other.internalGetPypiDependencies()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object buildLogUri_ = ""; + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildLogUri. + */ + public java.lang.String getBuildLogUri() { + java.lang.Object ref = buildLogUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildLogUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildLogUri. + */ + public com.google.protobuf.ByteString getBuildLogUriBytes() { + java.lang.Object ref = buildLogUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + buildLogUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The buildLogUri to set. + * @return This builder for chaining. + */ + public Builder setBuildLogUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildLogUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearBuildLogUri() { + + buildLogUri_ = getDefaultInstance().getBuildLogUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Url for a docker build log of an upgraded image.
+     * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for buildLogUri to set. + * @return This builder for chaining. + */ + public Builder setBuildLogUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildLogUri_ = value; + onChanged(); + return this; + } + + private int containsPypiModulesConflict_ = 0; + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for containsPypiModulesConflict. + */ + @java.lang.Override + public int getContainsPypiModulesConflictValue() { + return containsPypiModulesConflict_; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for containsPypiModulesConflict to set. + * @return This builder for chaining. + */ + public Builder setContainsPypiModulesConflictValue(int value) { + + containsPypiModulesConflict_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The containsPypiModulesConflict. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .ConflictResult + getContainsPypiModulesConflict() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + result = + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .ConflictResult.valueOf(containsPypiModulesConflict_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + .ConflictResult.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The containsPypiModulesConflict to set. + * @return This builder for chaining. + */ + public Builder setContainsPypiModulesConflict( + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + value) { + if (value == null) { + throw new NullPointerException(); + } + + containsPypiModulesConflict_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Whether build has succeeded or failed on modules conflicts.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearContainsPypiModulesConflict() { + + containsPypiModulesConflict_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pypiConflictBuildLogExtract_ = ""; + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pypiConflictBuildLogExtract. + */ + public java.lang.String getPypiConflictBuildLogExtract() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pypiConflictBuildLogExtract_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pypiConflictBuildLogExtract. + */ + public com.google.protobuf.ByteString getPypiConflictBuildLogExtractBytes() { + java.lang.Object ref = pypiConflictBuildLogExtract_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pypiConflictBuildLogExtract_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The pypiConflictBuildLogExtract to set. + * @return This builder for chaining. + */ + public Builder setPypiConflictBuildLogExtract(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pypiConflictBuildLogExtract_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearPypiConflictBuildLogExtract() { + + pypiConflictBuildLogExtract_ = getDefaultInstance().getPypiConflictBuildLogExtract(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Extract from a docker image build log containing information about pypi
+     * modules conflicts.
+     * 
+ * + * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for pypiConflictBuildLogExtract to set. + * @return This builder for chaining. + */ + public Builder setPypiConflictBuildLogExtractBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pypiConflictBuildLogExtract_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageVersion_ = ""; + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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; + } + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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; + } + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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; + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @return This builder for chaining. + */ + public Builder clearImageVersion() { + + imageVersion_ = getDefaultInstance().getImageVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Composer image for which the build was happening.
+     * 
+ * + * string image_version = 5; + * + * @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 pypiDependencies_; + + private com.google.protobuf.MapField + internalGetPypiDependencies() { + if (pypiDependencies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + } + return pypiDependencies_; + } + + private com.google.protobuf.MapField + internalGetMutablePypiDependencies() { + onChanged(); + ; + if (pypiDependencies_ == null) { + pypiDependencies_ = + com.google.protobuf.MapField.newMapField( + PypiDependenciesDefaultEntryHolder.defaultEntry); + } + if (!pypiDependencies_.isMutable()) { + pypiDependencies_ = pypiDependencies_.copy(); + } + return pypiDependencies_; + } + + public int getPypiDependenciesCount() { + return internalGetPypiDependencies().getMap().size(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public boolean containsPypiDependencies(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiDependencies().getMap().containsKey(key); + } + /** Use {@link #getPypiDependenciesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiDependencies() { + return getPypiDependenciesMap(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.util.Map getPypiDependenciesMap() { + return internalGetPypiDependencies().getMap(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetPypiDependencies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + @java.lang.Override + public java.lang.String getPypiDependenciesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetPypiDependencies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPypiDependencies() { + internalGetMutablePypiDependencies().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + public Builder removePypiDependencies(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiDependencies().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePypiDependencies() { + return internalGetMutablePypiDependencies().getMutableMap(); + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + public Builder putPypiDependencies(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiDependencies().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Pypi dependencies specified in the environment configuration, at the time
+     * when the build was triggered.
+     * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + public Builder putAllPypiDependencies( + java.util.Map values) { + internalGetMutablePypiDependencies().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.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckUpgradeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CheckUpgradeResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeResponseOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeResponseOrBuilder.java new file mode 100644 index 00000000..745457ec --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CheckUpgradeResponseOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface CheckUpgradeResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The buildLogUri. + */ + java.lang.String getBuildLogUri(); + /** + * + * + *
+   * Output only. Url for a docker build log of an upgraded image.
+   * 
+ * + * string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for buildLogUri. + */ + com.google.protobuf.ByteString getBuildLogUriBytes(); + + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for containsPypiModulesConflict. + */ + int getContainsPypiModulesConflictValue(); + /** + * + * + *
+   * Output only. Whether build has succeeded or failed on modules conflicts.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The containsPypiModulesConflict. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + getContainsPypiModulesConflict(); + + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The pypiConflictBuildLogExtract. + */ + java.lang.String getPypiConflictBuildLogExtract(); + /** + * + * + *
+   * Output only. Extract from a docker image build log containing information about pypi
+   * modules conflicts.
+   * 
+ * + * string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for pypiConflictBuildLogExtract. + */ + com.google.protobuf.ByteString getPypiConflictBuildLogExtractBytes(); + + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @return The imageVersion. + */ + java.lang.String getImageVersion(); + /** + * + * + *
+   * Composer image for which the build was happening.
+   * 
+ * + * string image_version = 5; + * + * @return The bytes for imageVersion. + */ + com.google.protobuf.ByteString getImageVersionBytes(); + + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + int getPypiDependenciesCount(); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + boolean containsPypiDependencies(java.lang.String key); + /** Use {@link #getPypiDependenciesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPypiDependencies(); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + java.util.Map getPypiDependenciesMap(); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + java.lang.String getPypiDependenciesOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Pypi dependencies specified in the environment configuration, at the time
+   * when the build was triggered.
+   * 
+ * + * map<string, string> pypi_dependencies = 6; + */ + java.lang.String getPypiDependenciesOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CreateEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CreateEnvironmentRequest.java new file mode 100644 index 00000000..fd59c191 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CreateEnvironmentRequest.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Create a new environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} + */ +public final class CreateEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + CreateEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEnvironmentRequest.newBuilder() to construct. + private CreateEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEnvironmentRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEnvironmentRequest( + 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.orchestration.airflow.service.v1beta1.Environment.Builder + subBuilder = null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1beta1.Environment environment_; + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + * + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + return getEnvironment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (environment_ != null) { + output.writeMessage(2, getEnvironment()); + } + 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 (environment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEnvironment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment().equals(other.getEnvironment())) return false; + } + if (!unknownFields.equals(other.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 (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Create a new environment.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + environmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(this); + result.parent_ = parent_; + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.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.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * The parent must be of the form
+     * "projects/{projectId}/locations/{locationId}".
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + * + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return environmentBuilder_ != null || environment_ != null; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + * + * @return The environment. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + public Builder mergeEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.newBuilder( + environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * The environment to create.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .CreateEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CreateEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CreateEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..ff2de928 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/CreateEnvironmentRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface CreateEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * The parent must be of the form
+   * "projects/{projectId}/locations/{locationId}".
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + * + * @return The environment. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment(); + /** + * + * + *
+   * The environment to create.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 2; + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseConfig.java new file mode 100644 index 00000000..38a96ee7 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseConfig.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The configuration of Cloud SQL instance that is used by the Apache Airflow
+ * software.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} + */ +public final class DatabaseConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + DatabaseConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DatabaseConfig.newBuilder() to construct. + private DatabaseConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DatabaseConfig() { + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DatabaseConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DatabaseConfig( + 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(); + + machineType_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration of Cloud SQL instance that is used by the Apache Airflow
+   * software.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + machineType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(this); + result.machineType_ = machineType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + .getDefaultInstance()) return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + 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.orchestration.airflow.service.v1beta1.DatabaseConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Cloud SQL machine type used by Airflow database.
+     * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+     * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DatabaseConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DatabaseConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseConfigOrBuilder.java new file mode 100644 index 00000000..2895d4e2 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DatabaseConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface DatabaseConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Optional. Cloud SQL machine type used by Airflow database.
+   * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8
+   * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DeleteEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DeleteEnvironmentRequest.java new file mode 100644 index 00000000..5a548c5d --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DeleteEnvironmentRequest.java @@ -0,0 +1,673 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Delete an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} + */ +public final class DeleteEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + DeleteEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteEnvironmentRequest.newBuilder() to construct. + private DeleteEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteEnvironmentRequest( + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) 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.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Delete an environment.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(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.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + .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.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The environment to delete, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .DeleteEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DeleteEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DeleteEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..29950312 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/DeleteEnvironmentRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface DeleteEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The environment to delete, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EncryptionConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EncryptionConfig.java new file mode 100644 index 00000000..231330dd --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EncryptionConfig.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The encryption options for the Cloud Composer environment and its
+ * dependencies.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} + */ +public final class EncryptionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.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() { + kmsKeyName_ = ""; + } + + @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(); + + kmsKeyName_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder.class); + } + + public static final int KMS_KEY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object kmsKeyName_; + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + @java.lang.Override + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = 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 (!getKmsKeyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKmsKeyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) obj; + + if (!getKmsKeyName().equals(other.getKmsKeyName())) return false; + if (!unknownFields.equals(other.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) + KMS_KEY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getKmsKeyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.EncryptionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.EncryptionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.EncryptionConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.EncryptionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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; + } + /** + * + * + *
+   * The encryption options for the Cloud Composer environment and its
+   * dependencies.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.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(); + kmsKeyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(this); + result.kmsKeyName_ = kmsKeyName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + .getDefaultInstance()) return this; + if (!other.getKmsKeyName().isEmpty()) { + kmsKeyName_ = other.kmsKeyName_; + 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.orchestration.airflow.service.v1beta1.EncryptionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object kmsKeyName_ = ""; + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + public java.lang.String getKmsKeyName() { + java.lang.Object ref = kmsKeyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kmsKeyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + public com.google.protobuf.ByteString getKmsKeyNameBytes() { + java.lang.Object ref = kmsKeyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKeyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + kmsKeyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearKmsKeyName() { + + kmsKeyName_ = getDefaultInstance().getKmsKeyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Customer-managed Encryption Key available through Google's Key Management
+     * Service. Cannot be updated.
+     * If not specified, Google-managed key will be used.
+     * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for kmsKeyName to set. + * @return This builder for chaining. + */ + public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + kmsKeyName_ = 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.orchestration.airflow.service.v1beta1.EncryptionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.EncryptionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EncryptionConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EncryptionConfigOrBuilder.java new file mode 100644 index 00000000..77058a6c --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EncryptionConfigOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface EncryptionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The kmsKeyName. + */ + java.lang.String getKmsKeyName(); + /** + * + * + *
+   * Optional. Customer-managed Encryption Key available through Google's Key Management
+   * Service. Cannot be updated.
+   * If not specified, Google-managed key will be used.
+   * 
+ * + * string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for kmsKeyName. + */ + com.google.protobuf.ByteString getKmsKeyNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/Environment.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/Environment.java new file mode 100644 index 00000000..49455b45 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/Environment.java @@ -0,0 +1,2519 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * An environment for running orchestration tasks.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.Environment} + */ +public final class Environment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.Environment) + EnvironmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Environment.newBuilder() to construct. + private Environment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Environment() { + name_ = ""; + uuid_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Environment(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Environment( + 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: + { + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder + subBuilder = null; + if (config_ != null) { + subBuilder = config_.toBuilder(); + } + config_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(config_); + config_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + uuid_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 42: + { + 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 50: + { + 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 58: + { + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.class, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder.class); + } + + /** + * + * + *
+   * State of the environment.
+   * 
+ * + * Protobuf enum {@code google.cloud.orchestration.airflow.service.v1beta1.Environment.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The state of the environment is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The environment is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + CREATING(1), + /** + * + * + *
+     * The environment is currently running and healthy. It is ready for use.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The environment is being updated. It remains usable but cannot receive
+     * additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + UPDATING(3), + /** + * + * + *
+     * The environment is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + DELETING(4), + /** + * + * + *
+     * The environment has encountered an error and cannot be used.
+     * 
+ * + * ERROR = 5; + */ + ERROR(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The state of the environment is unknown.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The environment is in the process of being created.
+     * 
+ * + * CREATING = 1; + */ + public static final int CREATING_VALUE = 1; + /** + * + * + *
+     * The environment is currently running and healthy. It is ready for use.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The environment is being updated. It remains usable but cannot receive
+     * additional update requests or be deleted at this time.
+     * 
+ * + * UPDATING = 3; + */ + public static final int UPDATING_VALUE = 3; + /** + * + * + *
+     * The environment is undergoing deletion. It cannot be used.
+     * 
+ * + * DELETING = 4; + */ + public static final int DELETING_VALUE = 4; + /** + * + * + *
+     * The environment has encountered an error and cannot be used.
+     * 
+ * + * ERROR = 5; + */ + public static final int ERROR_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return CREATING; + case 2: + return RUNNING; + case 3: + return UPDATING; + case 4: + return DELETING; + case 5: + return ERROR; + 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.orchestration.airflow.service.v1beta1.Environment.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.orchestration.airflow.service.v1beta1.Environment.State) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * 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 CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config_; + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + * @return Whether the config field is set. + */ + @java.lang.Override + public boolean hasConfig() { + return config_ != null; + } + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + * @return The config. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig getConfig() { + return config_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDefaultInstance() + : config_; + } + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder + getConfigOrBuilder() { + return getConfig(); + } + + public static final int UUID_FIELD_NUMBER = 3; + private volatile java.lang.Object uuid_; + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uuid. + */ + @java.lang.Override + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATE_FIELD_NUMBER = 4; + private int state_; + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State result = + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State.UNRECOGNIZED + : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_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. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (config_ != null) { + output.writeMessage(2, getConfig()); + } + if (!getUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uuid_); + } + if (state_ + != com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, state_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + 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 (config_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfig()); + } + if (!getUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uuid_); + } + if (state_ + != com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, 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(7, 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.orchestration.airflow.service.v1beta1.Environment)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.Environment other = + (com.google.cloud.orchestration.airflow.service.v1beta1.Environment) obj; + + if (!getName().equals(other.getName())) return false; + if (hasConfig() != other.hasConfig()) return false; + if (hasConfig()) { + if (!getConfig().equals(other.getConfig())) return false; + } + if (!getUuid().equals(other.getUuid())) return false; + if (state_ != other.state_) 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 (!unknownFields.equals(other.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 (hasConfig()) { + hash = (37 * hash) + CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getConfig().hashCode(); + } + hash = (37 * hash) + UUID_FIELD_NUMBER; + hash = (53 * hash) + getUuid().hashCode(); + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + 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(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An environment for running orchestration tasks.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.Environment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.Environment) + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.class, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.Environment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (configBuilder_ == null) { + config_ = null; + } else { + config_ = null; + configBuilder_ = null; + } + uuid_ = ""; + + state_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + internalGetMutableLabels().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment build() { + com.google.cloud.orchestration.airflow.service.v1beta1.Environment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.Environment result = + new com.google.cloud.orchestration.airflow.service.v1beta1.Environment(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (configBuilder_ == null) { + result.config_ = config_; + } else { + result.config_ = configBuilder_.build(); + } + result.uuid_ = uuid_; + result.state_ = state_; + 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(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1beta1.Environment) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.Environment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasConfig()) { + mergeConfig(other.getConfig()); + } + if (!other.getUuid().isEmpty()) { + uuid_ = other.uuid_; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + 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.orchestration.airflow.service.v1beta1.Environment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.Environment) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * EnvironmentId must start with a lowercase letter followed by up to 63
+     * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder> + configBuilder_; + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + * + * @return Whether the config field is set. + */ + public boolean hasConfig() { + return configBuilder_ != null || config_ != null; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + * + * @return The config. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig getConfig() { + if (configBuilder_ == null) { + return config_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDefaultInstance() + : config_; + } else { + return configBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + public Builder setConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig value) { + if (configBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + config_ = value; + onChanged(); + } else { + configBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + public Builder setConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder + builderForValue) { + if (configBuilder_ == null) { + config_ = builderForValue.build(); + onChanged(); + } else { + configBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + public Builder mergeConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig value) { + if (configBuilder_ == null) { + if (config_ != null) { + config_ = + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.newBuilder( + config_) + .mergeFrom(value) + .buildPartial(); + } else { + config_ = value; + } + onChanged(); + } else { + configBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + public Builder clearConfig() { + if (configBuilder_ == null) { + config_ = null; + onChanged(); + } else { + config_ = null; + configBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder + getConfigBuilder() { + + onChanged(); + return getConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder + getConfigOrBuilder() { + if (configBuilder_ != null) { + return configBuilder_.getMessageOrBuilder(); + } else { + return config_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDefaultInstance() + : config_; + } + } + /** + * + * + *
+     * Configuration parameters for this environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder> + getConfigFieldBuilder() { + if (configBuilder_ == null) { + configBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder>( + getConfig(), getParentForChildren(), isClean()); + config_ = null; + } + return configBuilder_; + } + + private java.lang.Object uuid_ = ""; + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uuid. + */ + public java.lang.String getUuid() { + java.lang.Object ref = uuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uuid. + */ + public com.google.protobuf.ByteString getUuidBytes() { + java.lang.Object ref = uuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uuid to set. + * @return This builder for chaining. + */ + public Builder setUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUuid() { + + uuid_ = getDefaultInstance().getUuid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+     * This value is generated when the environment is created.
+     * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uuid to set. + * @return This builder for chaining. + */ + public Builder setUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uuid_ = value; + onChanged(); + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + + state_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State result = + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State.valueOf(state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The current state of the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 at which this environment was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_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> + 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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 at which this environment was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp update_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> + 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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.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. User-defined labels for this environment.
+     * The labels map can contain no more than 64 entries. Entries of the labels
+     * map are UTF8 strings that comply with the following restrictions:
+     * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+     * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+     * * Both keys and values are additionally constrained to be <= 128 bytes in
+     * size.
+     * 
+ * + * map<string, string> labels = 7 [(.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.orchestration.airflow.service.v1beta1.Environment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.Environment) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.Environment + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.Environment(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.Environment + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Environment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Environment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java new file mode 100644 index 00000000..74b2f256 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfig.java @@ -0,0 +1,4565 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Configuration information for an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} + */ +public final class EnvironmentConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + EnvironmentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvironmentConfig.newBuilder() to construct. + private EnvironmentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnvironmentConfig() { + gkeCluster_ = ""; + dagGcsPrefix_ = ""; + airflowUri_ = ""; + environmentSize_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnvironmentConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnvironmentConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + gkeCluster_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + dagGcsPrefix_ = s; + break; + } + case 24: + { + nodeCount_ = input.readInt32(); + break; + } + case 34: + { + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder + subBuilder = null; + if (softwareConfig_ != null) { + subBuilder = softwareConfig_.toBuilder(); + } + softwareConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(softwareConfig_); + softwareConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder subBuilder = + null; + if (nodeConfig_ != null) { + subBuilder = nodeConfig_.toBuilder(); + } + nodeConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(nodeConfig_); + nodeConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + airflowUri_ = s; + break; + } + case 58: + { + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .Builder + subBuilder = null; + if (privateEnvironmentConfig_ != null) { + subBuilder = privateEnvironmentConfig_.toBuilder(); + } + privateEnvironmentConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1 + .PrivateEnvironmentConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(privateEnvironmentConfig_); + privateEnvironmentConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder + subBuilder = null; + if (webServerNetworkAccessControl_ != null) { + subBuilder = webServerNetworkAccessControl_.toBuilder(); + } + webServerNetworkAccessControl_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webServerNetworkAccessControl_); + webServerNetworkAccessControl_ = subBuilder.buildPartial(); + } + + break; + } + case 82: + { + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder + subBuilder = null; + if (databaseConfig_ != null) { + subBuilder = databaseConfig_.toBuilder(); + } + databaseConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(databaseConfig_); + databaseConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder + subBuilder = null; + if (webServerConfig_ != null) { + subBuilder = webServerConfig_.toBuilder(); + } + webServerConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webServerConfig_); + webServerConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder + subBuilder = null; + if (encryptionConfig_ != null) { + subBuilder = encryptionConfig_.toBuilder(); + } + encryptionConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(encryptionConfig_); + encryptionConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder + subBuilder = null; + if (maintenanceWindow_ != null) { + subBuilder = maintenanceWindow_.toBuilder(); + } + maintenanceWindow_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maintenanceWindow_); + maintenanceWindow_ = subBuilder.buildPartial(); + } + + break; + } + case 122: + { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder + subBuilder = null; + if (workloadsConfig_ != null) { + subBuilder = workloadsConfig_.toBuilder(); + } + workloadsConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(workloadsConfig_); + workloadsConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 128: + { + int rawValue = input.readEnum(); + + environmentSize_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder.class); + } + + /** + * + * + *
+   * The size of the Cloud Composer environment.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize} + */ + public enum EnvironmentSize implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The size of the environment is unspecified.
+     * 
+ * + * ENVIRONMENT_SIZE_UNSPECIFIED = 0; + */ + ENVIRONMENT_SIZE_UNSPECIFIED(0), + /** + * + * + *
+     * The environment size is small.
+     * 
+ * + * ENVIRONMENT_SIZE_SMALL = 1; + */ + ENVIRONMENT_SIZE_SMALL(1), + /** + * + * + *
+     * The environment size is medium.
+     * 
+ * + * ENVIRONMENT_SIZE_MEDIUM = 2; + */ + ENVIRONMENT_SIZE_MEDIUM(2), + /** + * + * + *
+     * The environment size is large.
+     * 
+ * + * ENVIRONMENT_SIZE_LARGE = 3; + */ + ENVIRONMENT_SIZE_LARGE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The size of the environment is unspecified.
+     * 
+ * + * ENVIRONMENT_SIZE_UNSPECIFIED = 0; + */ + public static final int ENVIRONMENT_SIZE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The environment size is small.
+     * 
+ * + * ENVIRONMENT_SIZE_SMALL = 1; + */ + public static final int ENVIRONMENT_SIZE_SMALL_VALUE = 1; + /** + * + * + *
+     * The environment size is medium.
+     * 
+ * + * ENVIRONMENT_SIZE_MEDIUM = 2; + */ + public static final int ENVIRONMENT_SIZE_MEDIUM_VALUE = 2; + /** + * + * + *
+     * The environment size is large.
+     * 
+ * + * ENVIRONMENT_SIZE_LARGE = 3; + */ + public static final int ENVIRONMENT_SIZE_LARGE_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 EnvironmentSize 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 EnvironmentSize forNumber(int value) { + switch (value) { + case 0: + return ENVIRONMENT_SIZE_UNSPECIFIED; + case 1: + return ENVIRONMENT_SIZE_SMALL; + case 2: + return ENVIRONMENT_SIZE_MEDIUM; + case 3: + return ENVIRONMENT_SIZE_LARGE; + 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 EnvironmentSize findValueByNumber(int number) { + return EnvironmentSize.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.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EnvironmentSize[] VALUES = values(); + + public static EnvironmentSize 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 EnvironmentSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize) + } + + public static final int GKE_CLUSTER_FIELD_NUMBER = 1; + private volatile java.lang.Object gkeCluster_; + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gkeCluster. + */ + @java.lang.Override + public java.lang.String getGkeCluster() { + java.lang.Object ref = gkeCluster_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeCluster_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gkeCluster. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGkeClusterBytes() { + java.lang.Object ref = gkeCluster_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DAG_GCS_PREFIX_FIELD_NUMBER = 2; + private volatile java.lang.Object dagGcsPrefix_; + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dagGcsPrefix. + */ + @java.lang.Override + public java.lang.String getDagGcsPrefix() { + java.lang.Object ref = dagGcsPrefix_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dagGcsPrefix_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dagGcsPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDagGcsPrefixBytes() { + java.lang.Object ref = dagGcsPrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dagGcsPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NODE_COUNT_FIELD_NUMBER = 3; + private int nodeCount_; + /** + * + * + *
+   * The number of nodes in the Kubernetes Engine cluster that will be
+   * used to run this environment.
+   * 
+ * + * int32 node_count = 3; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + + public static final int SOFTWARE_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig softwareConfig_; + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + * + * @return Whether the softwareConfig field is set. + */ + @java.lang.Override + public boolean hasSoftwareConfig() { + return softwareConfig_ != null; + } + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + * + * @return The softwareConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig getSoftwareConfig() { + return softwareConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.getDefaultInstance() + : softwareConfig_; + } + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + return getSoftwareConfig(); + } + + public static final int NODE_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig nodeConfig_; + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + * + * @return Whether the nodeConfig field is set. + */ + @java.lang.Override + public boolean hasNodeConfig() { + return nodeConfig_ != null; + } + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + * + * @return The nodeConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig getNodeConfig() { + return nodeConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.getDefaultInstance() + : nodeConfig_; + } + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder + getNodeConfigOrBuilder() { + return getNodeConfig(); + } + + public static final int PRIVATE_ENVIRONMENT_CONFIG_FIELD_NUMBER = 7; + private com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + privateEnvironmentConfig_; + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return Whether the privateEnvironmentConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateEnvironmentConfig() { + return privateEnvironmentConfig_ != null; + } + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return The privateEnvironmentConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + getPrivateEnvironmentConfig() { + return privateEnvironmentConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .getDefaultInstance() + : privateEnvironmentConfig_; + } + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfigOrBuilder + getPrivateEnvironmentConfigOrBuilder() { + return getPrivateEnvironmentConfig(); + } + + public static final int WEB_SERVER_NETWORK_ACCESS_CONTROL_FIELD_NUMBER = 9; + private com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + webServerNetworkAccessControl_; + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerNetworkAccessControl field is set. + */ + @java.lang.Override + public boolean hasWebServerNetworkAccessControl() { + return webServerNetworkAccessControl_ != null; + } + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerNetworkAccessControl. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + getWebServerNetworkAccessControl() { + return webServerNetworkAccessControl_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .getDefaultInstance() + : webServerNetworkAccessControl_; + } + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControlOrBuilder + getWebServerNetworkAccessControlOrBuilder() { + return getWebServerNetworkAccessControl(); + } + + public static final int DATABASE_CONFIG_FIELD_NUMBER = 10; + private com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig databaseConfig_; + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseConfig field is set. + */ + @java.lang.Override + public boolean hasDatabaseConfig() { + return databaseConfig_ != null; + } + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig getDatabaseConfig() { + return databaseConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.getDefaultInstance() + : databaseConfig_; + } + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder + getDatabaseConfigOrBuilder() { + return getDatabaseConfig(); + } + + public static final int WEB_SERVER_CONFIG_FIELD_NUMBER = 11; + private com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig webServerConfig_; + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerConfig field is set. + */ + @java.lang.Override + public boolean hasWebServerConfig() { + return webServerConfig_ != null; + } + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + getWebServerConfig() { + return webServerConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + .getDefaultInstance() + : webServerConfig_; + } + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder + getWebServerConfigOrBuilder() { + return getWebServerConfig(); + } + + public static final int AIRFLOW_URI_FIELD_NUMBER = 6; + private volatile java.lang.Object airflowUri_; + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The airflowUri. + */ + @java.lang.Override + public java.lang.String getAirflowUri() { + java.lang.Object ref = airflowUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + airflowUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for airflowUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAirflowUriBytes() { + java.lang.Object ref = airflowUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + airflowUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCRYPTION_CONFIG_FIELD_NUMBER = 12; + private com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryptionConfig_; + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment and its
+   * dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + @java.lang.Override + public boolean hasEncryptionConfig() { + return encryptionConfig_ != null; + } + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment and its
+   * dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + getEncryptionConfig() { + return encryptionConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + .getDefaultInstance() + : encryptionConfig_; + } + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment and its
+   * dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + return getEncryptionConfig(); + } + + public static final int MAINTENANCE_WINDOW_FIELD_NUMBER = 13; + private com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + maintenanceWindow_; + /** + * + * + *
+   * Optional. The maintenance window is the period when Cloud Composer components may
+   * undergo maintenance. It is defined so that maintenance is not executed
+   * during peak hours or critical time periods.
+   * The system will not be under maintenance for every occurrence of this
+   * window, but when maintenance is planned, it will be scheduled
+   * during the window.
+   * The maintenance window period must encompass at least 12 hours per week.
+   * This may be split into multiple chunks, each with a size of
+   * at least 4 hours.
+   * If this value is omitted, Cloud Composer components may be subject to
+   * maintenance at any time.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maintenanceWindow field is set. + */ + @java.lang.Override + public boolean hasMaintenanceWindow() { + return maintenanceWindow_ != null; + } + /** + * + * + *
+   * Optional. The maintenance window is the period when Cloud Composer components may
+   * undergo maintenance. It is defined so that maintenance is not executed
+   * during peak hours or critical time periods.
+   * The system will not be under maintenance for every occurrence of this
+   * window, but when maintenance is planned, it will be scheduled
+   * during the window.
+   * The maintenance window period must encompass at least 12 hours per week.
+   * This may be split into multiple chunks, each with a size of
+   * at least 4 hours.
+   * If this value is omitted, Cloud Composer components may be subject to
+   * maintenance at any time.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maintenanceWindow. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + getMaintenanceWindow() { + return maintenanceWindow_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + .getDefaultInstance() + : maintenanceWindow_; + } + /** + * + * + *
+   * Optional. The maintenance window is the period when Cloud Composer components may
+   * undergo maintenance. It is defined so that maintenance is not executed
+   * during peak hours or critical time periods.
+   * The system will not be under maintenance for every occurrence of this
+   * window, but when maintenance is planned, it will be scheduled
+   * during the window.
+   * The maintenance window period must encompass at least 12 hours per week.
+   * This may be split into multiple chunks, each with a size of
+   * at least 4 hours.
+   * If this value is omitted, Cloud Composer components may be subject to
+   * maintenance at any time.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder + getMaintenanceWindowOrBuilder() { + return getMaintenanceWindow(); + } + + public static final int WORKLOADS_CONFIG_FIELD_NUMBER = 15; + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloadsConfig_; + /** + * + * + *
+   * Optional. The workloads configuration settings for the GKE cluster associated with
+   * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+   * server and workers workloads.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the workloadsConfig field is set. + */ + @java.lang.Override + public boolean hasWorkloadsConfig() { + return workloadsConfig_ != null; + } + /** + * + * + *
+   * Optional. The workloads configuration settings for the GKE cluster associated with
+   * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+   * server and workers workloads.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The workloadsConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + getWorkloadsConfig() { + return workloadsConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .getDefaultInstance() + : workloadsConfig_; + } + /** + * + * + *
+   * Optional. The workloads configuration settings for the GKE cluster associated with
+   * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+   * server and workers workloads.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder + getWorkloadsConfigOrBuilder() { + return getWorkloadsConfig(); + } + + public static final int ENVIRONMENT_SIZE_FIELD_NUMBER = 16; + private int environmentSize_; + /** + * + * + *
+   * Optional. The size of the Cloud Composer environment.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for environmentSize. + */ + @java.lang.Override + public int getEnvironmentSizeValue() { + return environmentSize_; + } + /** + * + * + *
+   * Optional. The size of the Cloud Composer environment.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The environmentSize. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + getEnvironmentSize() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + result = + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + .valueOf(environmentSize_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + .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 (!getGkeClusterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gkeCluster_); + } + if (!getDagGcsPrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dagGcsPrefix_); + } + if (nodeCount_ != 0) { + output.writeInt32(3, nodeCount_); + } + if (softwareConfig_ != null) { + output.writeMessage(4, getSoftwareConfig()); + } + if (nodeConfig_ != null) { + output.writeMessage(5, getNodeConfig()); + } + if (!getAirflowUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, airflowUri_); + } + if (privateEnvironmentConfig_ != null) { + output.writeMessage(7, getPrivateEnvironmentConfig()); + } + if (webServerNetworkAccessControl_ != null) { + output.writeMessage(9, getWebServerNetworkAccessControl()); + } + if (databaseConfig_ != null) { + output.writeMessage(10, getDatabaseConfig()); + } + if (webServerConfig_ != null) { + output.writeMessage(11, getWebServerConfig()); + } + if (encryptionConfig_ != null) { + output.writeMessage(12, getEncryptionConfig()); + } + if (maintenanceWindow_ != null) { + output.writeMessage(13, getMaintenanceWindow()); + } + if (workloadsConfig_ != null) { + output.writeMessage(15, getWorkloadsConfig()); + } + if (environmentSize_ + != com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + .ENVIRONMENT_SIZE_UNSPECIFIED + .getNumber()) { + output.writeEnum(16, environmentSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGkeClusterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gkeCluster_); + } + if (!getDagGcsPrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dagGcsPrefix_); + } + if (nodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, nodeCount_); + } + if (softwareConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSoftwareConfig()); + } + if (nodeConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getNodeConfig()); + } + if (!getAirflowUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, airflowUri_); + } + if (privateEnvironmentConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, getPrivateEnvironmentConfig()); + } + if (webServerNetworkAccessControl_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, getWebServerNetworkAccessControl()); + } + if (databaseConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getDatabaseConfig()); + } + if (webServerConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getWebServerConfig()); + } + if (encryptionConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getEncryptionConfig()); + } + if (maintenanceWindow_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getMaintenanceWindow()); + } + if (workloadsConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getWorkloadsConfig()); + } + if (environmentSize_ + != com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + .ENVIRONMENT_SIZE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, environmentSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) obj; + + if (!getGkeCluster().equals(other.getGkeCluster())) return false; + if (!getDagGcsPrefix().equals(other.getDagGcsPrefix())) return false; + if (getNodeCount() != other.getNodeCount()) return false; + if (hasSoftwareConfig() != other.hasSoftwareConfig()) return false; + if (hasSoftwareConfig()) { + if (!getSoftwareConfig().equals(other.getSoftwareConfig())) return false; + } + if (hasNodeConfig() != other.hasNodeConfig()) return false; + if (hasNodeConfig()) { + if (!getNodeConfig().equals(other.getNodeConfig())) return false; + } + if (hasPrivateEnvironmentConfig() != other.hasPrivateEnvironmentConfig()) return false; + if (hasPrivateEnvironmentConfig()) { + if (!getPrivateEnvironmentConfig().equals(other.getPrivateEnvironmentConfig())) return false; + } + if (hasWebServerNetworkAccessControl() != other.hasWebServerNetworkAccessControl()) + return false; + if (hasWebServerNetworkAccessControl()) { + if (!getWebServerNetworkAccessControl().equals(other.getWebServerNetworkAccessControl())) + return false; + } + if (hasDatabaseConfig() != other.hasDatabaseConfig()) return false; + if (hasDatabaseConfig()) { + if (!getDatabaseConfig().equals(other.getDatabaseConfig())) return false; + } + if (hasWebServerConfig() != other.hasWebServerConfig()) return false; + if (hasWebServerConfig()) { + if (!getWebServerConfig().equals(other.getWebServerConfig())) return false; + } + if (!getAirflowUri().equals(other.getAirflowUri())) return false; + if (hasEncryptionConfig() != other.hasEncryptionConfig()) return false; + if (hasEncryptionConfig()) { + if (!getEncryptionConfig().equals(other.getEncryptionConfig())) return false; + } + if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false; + if (hasMaintenanceWindow()) { + if (!getMaintenanceWindow().equals(other.getMaintenanceWindow())) return false; + } + if (hasWorkloadsConfig() != other.hasWorkloadsConfig()) return false; + if (hasWorkloadsConfig()) { + if (!getWorkloadsConfig().equals(other.getWorkloadsConfig())) return false; + } + if (environmentSize_ != other.environmentSize_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GKE_CLUSTER_FIELD_NUMBER; + hash = (53 * hash) + getGkeCluster().hashCode(); + hash = (37 * hash) + DAG_GCS_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getDagGcsPrefix().hashCode(); + hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getNodeCount(); + if (hasSoftwareConfig()) { + hash = (37 * hash) + SOFTWARE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSoftwareConfig().hashCode(); + } + if (hasNodeConfig()) { + hash = (37 * hash) + NODE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNodeConfig().hashCode(); + } + if (hasPrivateEnvironmentConfig()) { + hash = (37 * hash) + PRIVATE_ENVIRONMENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateEnvironmentConfig().hashCode(); + } + if (hasWebServerNetworkAccessControl()) { + hash = (37 * hash) + WEB_SERVER_NETWORK_ACCESS_CONTROL_FIELD_NUMBER; + hash = (53 * hash) + getWebServerNetworkAccessControl().hashCode(); + } + if (hasDatabaseConfig()) { + hash = (37 * hash) + DATABASE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDatabaseConfig().hashCode(); + } + if (hasWebServerConfig()) { + hash = (37 * hash) + WEB_SERVER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWebServerConfig().hashCode(); + } + hash = (37 * hash) + AIRFLOW_URI_FIELD_NUMBER; + hash = (53 * hash) + getAirflowUri().hashCode(); + if (hasEncryptionConfig()) { + hash = (37 * hash) + ENCRYPTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionConfig().hashCode(); + } + if (hasMaintenanceWindow()) { + hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER; + hash = (53 * hash) + getMaintenanceWindow().hashCode(); + } + if (hasWorkloadsConfig()) { + hash = (37 * hash) + WORKLOADS_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getWorkloadsConfig().hashCode(); + } + hash = (37 * hash) + ENVIRONMENT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + environmentSize_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration information for an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + gkeCluster_ = ""; + + dagGcsPrefix_ = ""; + + nodeCount_ = 0; + + if (softwareConfigBuilder_ == null) { + softwareConfig_ = null; + } else { + softwareConfig_ = null; + softwareConfigBuilder_ = null; + } + if (nodeConfigBuilder_ == null) { + nodeConfig_ = null; + } else { + nodeConfig_ = null; + nodeConfigBuilder_ = null; + } + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfig_ = null; + } else { + privateEnvironmentConfig_ = null; + privateEnvironmentConfigBuilder_ = null; + } + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControl_ = null; + } else { + webServerNetworkAccessControl_ = null; + webServerNetworkAccessControlBuilder_ = null; + } + if (databaseConfigBuilder_ == null) { + databaseConfig_ = null; + } else { + databaseConfig_ = null; + databaseConfigBuilder_ = null; + } + if (webServerConfigBuilder_ == null) { + webServerConfig_ = null; + } else { + webServerConfig_ = null; + webServerConfigBuilder_ = null; + } + airflowUri_ = ""; + + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + if (maintenanceWindowBuilder_ == null) { + maintenanceWindow_ = null; + } else { + maintenanceWindow_ = null; + maintenanceWindowBuilder_ = null; + } + if (workloadsConfigBuilder_ == null) { + workloadsConfig_ = null; + } else { + workloadsConfig_ = null; + workloadsConfigBuilder_ = null; + } + environmentSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(this); + result.gkeCluster_ = gkeCluster_; + result.dagGcsPrefix_ = dagGcsPrefix_; + result.nodeCount_ = nodeCount_; + if (softwareConfigBuilder_ == null) { + result.softwareConfig_ = softwareConfig_; + } else { + result.softwareConfig_ = softwareConfigBuilder_.build(); + } + if (nodeConfigBuilder_ == null) { + result.nodeConfig_ = nodeConfig_; + } else { + result.nodeConfig_ = nodeConfigBuilder_.build(); + } + if (privateEnvironmentConfigBuilder_ == null) { + result.privateEnvironmentConfig_ = privateEnvironmentConfig_; + } else { + result.privateEnvironmentConfig_ = privateEnvironmentConfigBuilder_.build(); + } + if (webServerNetworkAccessControlBuilder_ == null) { + result.webServerNetworkAccessControl_ = webServerNetworkAccessControl_; + } else { + result.webServerNetworkAccessControl_ = webServerNetworkAccessControlBuilder_.build(); + } + if (databaseConfigBuilder_ == null) { + result.databaseConfig_ = databaseConfig_; + } else { + result.databaseConfig_ = databaseConfigBuilder_.build(); + } + if (webServerConfigBuilder_ == null) { + result.webServerConfig_ = webServerConfig_; + } else { + result.webServerConfig_ = webServerConfigBuilder_.build(); + } + result.airflowUri_ = airflowUri_; + if (encryptionConfigBuilder_ == null) { + result.encryptionConfig_ = encryptionConfig_; + } else { + result.encryptionConfig_ = encryptionConfigBuilder_.build(); + } + if (maintenanceWindowBuilder_ == null) { + result.maintenanceWindow_ = maintenanceWindow_; + } else { + result.maintenanceWindow_ = maintenanceWindowBuilder_.build(); + } + if (workloadsConfigBuilder_ == null) { + result.workloadsConfig_ = workloadsConfig_; + } else { + result.workloadsConfig_ = workloadsConfigBuilder_.build(); + } + result.environmentSize_ = environmentSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .getDefaultInstance()) return this; + if (!other.getGkeCluster().isEmpty()) { + gkeCluster_ = other.gkeCluster_; + onChanged(); + } + if (!other.getDagGcsPrefix().isEmpty()) { + dagGcsPrefix_ = other.dagGcsPrefix_; + onChanged(); + } + if (other.getNodeCount() != 0) { + setNodeCount(other.getNodeCount()); + } + if (other.hasSoftwareConfig()) { + mergeSoftwareConfig(other.getSoftwareConfig()); + } + if (other.hasNodeConfig()) { + mergeNodeConfig(other.getNodeConfig()); + } + if (other.hasPrivateEnvironmentConfig()) { + mergePrivateEnvironmentConfig(other.getPrivateEnvironmentConfig()); + } + if (other.hasWebServerNetworkAccessControl()) { + mergeWebServerNetworkAccessControl(other.getWebServerNetworkAccessControl()); + } + if (other.hasDatabaseConfig()) { + mergeDatabaseConfig(other.getDatabaseConfig()); + } + if (other.hasWebServerConfig()) { + mergeWebServerConfig(other.getWebServerConfig()); + } + if (!other.getAirflowUri().isEmpty()) { + airflowUri_ = other.airflowUri_; + onChanged(); + } + if (other.hasEncryptionConfig()) { + mergeEncryptionConfig(other.getEncryptionConfig()); + } + if (other.hasMaintenanceWindow()) { + mergeMaintenanceWindow(other.getMaintenanceWindow()); + } + if (other.hasWorkloadsConfig()) { + mergeWorkloadsConfig(other.getWorkloadsConfig()); + } + if (other.environmentSize_ != 0) { + setEnvironmentSizeValue(other.getEnvironmentSizeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gkeCluster_ = ""; + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gkeCluster. + */ + public java.lang.String getGkeCluster() { + java.lang.Object ref = gkeCluster_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gkeCluster_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gkeCluster. + */ + public com.google.protobuf.ByteString getGkeClusterBytes() { + java.lang.Object ref = gkeCluster_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gkeCluster_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The gkeCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeCluster(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gkeCluster_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearGkeCluster() { + + gkeCluster_ = getDefaultInstance().getGkeCluster(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Kubernetes Engine cluster used to run this environment.
+     * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for gkeCluster to set. + * @return This builder for chaining. + */ + public Builder setGkeClusterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gkeCluster_ = value; + onChanged(); + return this; + } + + private java.lang.Object dagGcsPrefix_ = ""; + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dagGcsPrefix. + */ + public java.lang.String getDagGcsPrefix() { + java.lang.Object ref = dagGcsPrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dagGcsPrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dagGcsPrefix. + */ + public com.google.protobuf.ByteString getDagGcsPrefixBytes() { + java.lang.Object ref = dagGcsPrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dagGcsPrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The dagGcsPrefix to set. + * @return This builder for chaining. + */ + public Builder setDagGcsPrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dagGcsPrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDagGcsPrefix() { + + dagGcsPrefix_ = getDefaultInstance().getDagGcsPrefix(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+     * Storage objects reside in a flat namespace, a hierarchical file tree
+     * can be simulated using "/"-delimited object name prefixes. DAG objects for
+     * this environment reside in a simulated directory with the given prefix.
+     * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for dagGcsPrefix to set. + * @return This builder for chaining. + */ + public Builder setDagGcsPrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dagGcsPrefix_ = value; + onChanged(); + return this; + } + + private int nodeCount_; + /** + * + * + *
+     * The number of nodes in the Kubernetes Engine cluster that will be
+     * used to run this environment.
+     * 
+ * + * int32 node_count = 3; + * + * @return The nodeCount. + */ + @java.lang.Override + public int getNodeCount() { + return nodeCount_; + } + /** + * + * + *
+     * The number of nodes in the Kubernetes Engine cluster that will be
+     * used to run this environment.
+     * 
+ * + * int32 node_count = 3; + * + * @param value The nodeCount to set. + * @return This builder for chaining. + */ + public Builder setNodeCount(int value) { + + nodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of nodes in the Kubernetes Engine cluster that will be
+     * used to run this environment.
+     * 
+ * + * int32 node_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearNodeCount() { + + nodeCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig softwareConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder> + softwareConfigBuilder_; + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + * + * @return Whether the softwareConfig field is set. + */ + public boolean hasSoftwareConfig() { + return softwareConfigBuilder_ != null || softwareConfig_ != null; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + * + * @return The softwareConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + getSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + return softwareConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + .getDefaultInstance() + : softwareConfig_; + } else { + return softwareConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + public Builder setSoftwareConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + softwareConfig_ = value; + onChanged(); + } else { + softwareConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + public Builder setSoftwareConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder + builderForValue) { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = builderForValue.build(); + onChanged(); + } else { + softwareConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + public Builder mergeSoftwareConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig value) { + if (softwareConfigBuilder_ == null) { + if (softwareConfig_ != null) { + softwareConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.newBuilder( + softwareConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + softwareConfig_ = value; + } + onChanged(); + } else { + softwareConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + public Builder clearSoftwareConfig() { + if (softwareConfigBuilder_ == null) { + softwareConfig_ = null; + onChanged(); + } else { + softwareConfig_ = null; + softwareConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder + getSoftwareConfigBuilder() { + + onChanged(); + return getSoftwareConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder + getSoftwareConfigOrBuilder() { + if (softwareConfigBuilder_ != null) { + return softwareConfigBuilder_.getMessageOrBuilder(); + } else { + return softwareConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + .getDefaultInstance() + : softwareConfig_; + } + } + /** + * + * + *
+     * The configuration settings for software inside the environment.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder> + getSoftwareConfigFieldBuilder() { + if (softwareConfigBuilder_ == null) { + softwareConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder>( + getSoftwareConfig(), getParentForChildren(), isClean()); + softwareConfig_ = null; + } + return softwareConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig nodeConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder> + nodeConfigBuilder_; + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + * + * @return Whether the nodeConfig field is set. + */ + public boolean hasNodeConfig() { + return nodeConfigBuilder_ != null || nodeConfig_ != null; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + * + * @return The nodeConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig getNodeConfig() { + if (nodeConfigBuilder_ == null) { + return nodeConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.getDefaultInstance() + : nodeConfig_; + } else { + return nodeConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + public Builder setNodeConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig value) { + if (nodeConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nodeConfig_ = value; + onChanged(); + } else { + nodeConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + public Builder setNodeConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder builderForValue) { + if (nodeConfigBuilder_ == null) { + nodeConfig_ = builderForValue.build(); + onChanged(); + } else { + nodeConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + public Builder mergeNodeConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig value) { + if (nodeConfigBuilder_ == null) { + if (nodeConfig_ != null) { + nodeConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.newBuilder( + nodeConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + nodeConfig_ = value; + } + onChanged(); + } else { + nodeConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + public Builder clearNodeConfig() { + if (nodeConfigBuilder_ == null) { + nodeConfig_ = null; + onChanged(); + } else { + nodeConfig_ = null; + nodeConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder + getNodeConfigBuilder() { + + onChanged(); + return getNodeConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder + getNodeConfigOrBuilder() { + if (nodeConfigBuilder_ != null) { + return nodeConfigBuilder_.getMessageOrBuilder(); + } else { + return nodeConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.getDefaultInstance() + : nodeConfig_; + } + } + /** + * + * + *
+     * The configuration used for the Kubernetes Engine cluster.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder> + getNodeConfigFieldBuilder() { + if (nodeConfigBuilder_ == null) { + nodeConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder>( + getNodeConfig(), getParentForChildren(), isClean()); + nodeConfig_ = null; + } + return nodeConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + privateEnvironmentConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .PrivateEnvironmentConfigOrBuilder> + privateEnvironmentConfigBuilder_; + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return Whether the privateEnvironmentConfig field is set. + */ + public boolean hasPrivateEnvironmentConfig() { + return privateEnvironmentConfigBuilder_ != null || privateEnvironmentConfig_ != null; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return The privateEnvironmentConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + getPrivateEnvironmentConfig() { + if (privateEnvironmentConfigBuilder_ == null) { + return privateEnvironmentConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .getDefaultInstance() + : privateEnvironmentConfig_; + } else { + return privateEnvironmentConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder setPrivateEnvironmentConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig value) { + if (privateEnvironmentConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateEnvironmentConfig_ = value; + onChanged(); + } else { + privateEnvironmentConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder setPrivateEnvironmentConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.Builder + builderForValue) { + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfig_ = builderForValue.build(); + onChanged(); + } else { + privateEnvironmentConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder mergePrivateEnvironmentConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig value) { + if (privateEnvironmentConfigBuilder_ == null) { + if (privateEnvironmentConfig_ != null) { + privateEnvironmentConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .newBuilder(privateEnvironmentConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + privateEnvironmentConfig_ = value; + } + onChanged(); + } else { + privateEnvironmentConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public Builder clearPrivateEnvironmentConfig() { + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfig_ = null; + onChanged(); + } else { + privateEnvironmentConfig_ = null; + privateEnvironmentConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.Builder + getPrivateEnvironmentConfigBuilder() { + + onChanged(); + return getPrivateEnvironmentConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfigOrBuilder + getPrivateEnvironmentConfigOrBuilder() { + if (privateEnvironmentConfigBuilder_ != null) { + return privateEnvironmentConfigBuilder_.getMessageOrBuilder(); + } else { + return privateEnvironmentConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .getDefaultInstance() + : privateEnvironmentConfig_; + } + } + /** + * + * + *
+     * The configuration used for the Private IP Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .PrivateEnvironmentConfigOrBuilder> + getPrivateEnvironmentConfigFieldBuilder() { + if (privateEnvironmentConfigBuilder_ == null) { + privateEnvironmentConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .PrivateEnvironmentConfigOrBuilder>( + getPrivateEnvironmentConfig(), getParentForChildren(), isClean()); + privateEnvironmentConfig_ = null; + } + return privateEnvironmentConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + webServerNetworkAccessControl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControlOrBuilder> + webServerNetworkAccessControlBuilder_; + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerNetworkAccessControl field is set. + */ + public boolean hasWebServerNetworkAccessControl() { + return webServerNetworkAccessControlBuilder_ != null + || webServerNetworkAccessControl_ != null; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerNetworkAccessControl. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + getWebServerNetworkAccessControl() { + if (webServerNetworkAccessControlBuilder_ == null) { + return webServerNetworkAccessControl_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .getDefaultInstance() + : webServerNetworkAccessControl_; + } else { + return webServerNetworkAccessControlBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerNetworkAccessControl( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + value) { + if (webServerNetworkAccessControlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webServerNetworkAccessControl_ = value; + onChanged(); + } else { + webServerNetworkAccessControlBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerNetworkAccessControl( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.Builder + builderForValue) { + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControl_ = builderForValue.build(); + onChanged(); + } else { + webServerNetworkAccessControlBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWebServerNetworkAccessControl( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + value) { + if (webServerNetworkAccessControlBuilder_ == null) { + if (webServerNetworkAccessControl_ != null) { + webServerNetworkAccessControl_ = + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .newBuilder(webServerNetworkAccessControl_) + .mergeFrom(value) + .buildPartial(); + } else { + webServerNetworkAccessControl_ = value; + } + onChanged(); + } else { + webServerNetworkAccessControlBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWebServerNetworkAccessControl() { + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControl_ = null; + onChanged(); + } else { + webServerNetworkAccessControl_ = null; + webServerNetworkAccessControlBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder + getWebServerNetworkAccessControlBuilder() { + + onChanged(); + return getWebServerNetworkAccessControlFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControlOrBuilder + getWebServerNetworkAccessControlOrBuilder() { + if (webServerNetworkAccessControlBuilder_ != null) { + return webServerNetworkAccessControlBuilder_.getMessageOrBuilder(); + } else { + return webServerNetworkAccessControl_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .getDefaultInstance() + : webServerNetworkAccessControl_; + } + } + /** + * + * + *
+     * Optional. The network-level access control policy for the Airflow web server. If
+     * unspecified, no network-level access restrictions will be applied.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControlOrBuilder> + getWebServerNetworkAccessControlFieldBuilder() { + if (webServerNetworkAccessControlBuilder_ == null) { + webServerNetworkAccessControlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControlOrBuilder>( + getWebServerNetworkAccessControl(), getParentForChildren(), isClean()); + webServerNetworkAccessControl_ = null; + } + return webServerNetworkAccessControlBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig databaseConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder> + databaseConfigBuilder_; + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseConfig field is set. + */ + public boolean hasDatabaseConfig() { + return databaseConfigBuilder_ != null || databaseConfig_ != null; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + getDatabaseConfig() { + if (databaseConfigBuilder_ == null) { + return databaseConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + .getDefaultInstance() + : databaseConfig_; + } else { + return databaseConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatabaseConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig value) { + if (databaseConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + databaseConfig_ = value; + onChanged(); + } else { + databaseConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDatabaseConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder + builderForValue) { + if (databaseConfigBuilder_ == null) { + databaseConfig_ = builderForValue.build(); + onChanged(); + } else { + databaseConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDatabaseConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig value) { + if (databaseConfigBuilder_ == null) { + if (databaseConfig_ != null) { + databaseConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.newBuilder( + databaseConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + databaseConfig_ = value; + } + onChanged(); + } else { + databaseConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDatabaseConfig() { + if (databaseConfigBuilder_ == null) { + databaseConfig_ = null; + onChanged(); + } else { + databaseConfig_ = null; + databaseConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder + getDatabaseConfigBuilder() { + + onChanged(); + return getDatabaseConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder + getDatabaseConfigOrBuilder() { + if (databaseConfigBuilder_ != null) { + return databaseConfigBuilder_.getMessageOrBuilder(); + } else { + return databaseConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + .getDefaultInstance() + : databaseConfig_; + } + } + /** + * + * + *
+     * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+     * Airflow software.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder> + getDatabaseConfigFieldBuilder() { + if (databaseConfigBuilder_ == null) { + databaseConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder>( + getDatabaseConfig(), getParentForChildren(), isClean()); + databaseConfig_ = null; + } + return databaseConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig webServerConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder> + webServerConfigBuilder_; + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerConfig field is set. + */ + public boolean hasWebServerConfig() { + return webServerConfigBuilder_ != null || webServerConfig_ != null; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + getWebServerConfig() { + if (webServerConfigBuilder_ == null) { + return webServerConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + .getDefaultInstance() + : webServerConfig_; + } else { + return webServerConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig value) { + if (webServerConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webServerConfig_ = value; + onChanged(); + } else { + webServerConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServerConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder + builderForValue) { + if (webServerConfigBuilder_ == null) { + webServerConfig_ = builderForValue.build(); + onChanged(); + } else { + webServerConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWebServerConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig value) { + if (webServerConfigBuilder_ == null) { + if (webServerConfig_ != null) { + webServerConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.newBuilder( + webServerConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + webServerConfig_ = value; + } + onChanged(); + } else { + webServerConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWebServerConfig() { + if (webServerConfigBuilder_ == null) { + webServerConfig_ = null; + onChanged(); + } else { + webServerConfig_ = null; + webServerConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder + getWebServerConfigBuilder() { + + onChanged(); + return getWebServerConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder + getWebServerConfigOrBuilder() { + if (webServerConfigBuilder_ != null) { + return webServerConfigBuilder_.getMessageOrBuilder(); + } else { + return webServerConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + .getDefaultInstance() + : webServerConfig_; + } + } + /** + * + * + *
+     * Optional. The configuration settings for the Airflow web server App Engine instance.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder> + getWebServerConfigFieldBuilder() { + if (webServerConfigBuilder_ == null) { + webServerConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder>( + getWebServerConfig(), getParentForChildren(), isClean()); + webServerConfig_ = null; + } + return webServerConfigBuilder_; + } + + private java.lang.Object airflowUri_ = ""; + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The airflowUri. + */ + public java.lang.String getAirflowUri() { + java.lang.Object ref = airflowUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + airflowUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for airflowUri. + */ + public com.google.protobuf.ByteString getAirflowUriBytes() { + java.lang.Object ref = airflowUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + airflowUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The airflowUri to set. + * @return This builder for chaining. + */ + public Builder setAirflowUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + airflowUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAirflowUri() { + + airflowUri_ = getDefaultInstance().getAirflowUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+     * [Airflow web
+     * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+     * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for airflowUri to set. + * @return This builder for chaining. + */ + public Builder setAirflowUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + airflowUri_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + encryptionConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder> + encryptionConfigBuilder_; + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + public boolean hasEncryptionConfig() { + return encryptionConfigBuilder_ != null || encryptionConfig_ != null; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + getEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + return encryptionConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + .getDefaultInstance() + : encryptionConfig_; + } else { + return encryptionConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionConfig_ = value; + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setEncryptionConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder + builderForValue) { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = builderForValue.build(); + onChanged(); + } else { + encryptionConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeEncryptionConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig value) { + if (encryptionConfigBuilder_ == null) { + if (encryptionConfig_ != null) { + encryptionConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.newBuilder( + encryptionConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + encryptionConfig_ = value; + } + onChanged(); + } else { + encryptionConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearEncryptionConfig() { + if (encryptionConfigBuilder_ == null) { + encryptionConfig_ = null; + onChanged(); + } else { + encryptionConfig_ = null; + encryptionConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder + getEncryptionConfigBuilder() { + + onChanged(); + return getEncryptionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder() { + if (encryptionConfigBuilder_ != null) { + return encryptionConfigBuilder_.getMessageOrBuilder(); + } else { + return encryptionConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + .getDefaultInstance() + : encryptionConfig_; + } + } + /** + * + * + *
+     * Optional. The encryption options for the Cloud Composer environment and its
+     * dependencies. Cannot be updated.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder> + getEncryptionConfigFieldBuilder() { + if (encryptionConfigBuilder_ == null) { + encryptionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder>( + getEncryptionConfig(), getParentForChildren(), isClean()); + encryptionConfig_ = null; + } + return encryptionConfigBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + maintenanceWindow_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder> + maintenanceWindowBuilder_; + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maintenanceWindow field is set. + */ + public boolean hasMaintenanceWindow() { + return maintenanceWindowBuilder_ != null || maintenanceWindow_ != null; + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maintenanceWindow. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + getMaintenanceWindow() { + if (maintenanceWindowBuilder_ == null) { + return maintenanceWindow_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + .getDefaultInstance() + : maintenanceWindow_; + } else { + return maintenanceWindowBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMaintenanceWindow( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maintenanceWindow_ = value; + onChanged(); + } else { + maintenanceWindowBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setMaintenanceWindow( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder + builderForValue) { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindow_ = builderForValue.build(); + onChanged(); + } else { + maintenanceWindowBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeMaintenanceWindow( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow value) { + if (maintenanceWindowBuilder_ == null) { + if (maintenanceWindow_ != null) { + maintenanceWindow_ = + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.newBuilder( + maintenanceWindow_) + .mergeFrom(value) + .buildPartial(); + } else { + maintenanceWindow_ = value; + } + onChanged(); + } else { + maintenanceWindowBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearMaintenanceWindow() { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindow_ = null; + onChanged(); + } else { + maintenanceWindow_ = null; + maintenanceWindowBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder + getMaintenanceWindowBuilder() { + + onChanged(); + return getMaintenanceWindowFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder + getMaintenanceWindowOrBuilder() { + if (maintenanceWindowBuilder_ != null) { + return maintenanceWindowBuilder_.getMessageOrBuilder(); + } else { + return maintenanceWindow_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + .getDefaultInstance() + : maintenanceWindow_; + } + } + /** + * + * + *
+     * Optional. The maintenance window is the period when Cloud Composer components may
+     * undergo maintenance. It is defined so that maintenance is not executed
+     * during peak hours or critical time periods.
+     * The system will not be under maintenance for every occurrence of this
+     * window, but when maintenance is planned, it will be scheduled
+     * during the window.
+     * The maintenance window period must encompass at least 12 hours per week.
+     * This may be split into multiple chunks, each with a size of
+     * at least 4 hours.
+     * If this value is omitted, Cloud Composer components may be subject to
+     * maintenance at any time.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder> + getMaintenanceWindowFieldBuilder() { + if (maintenanceWindowBuilder_ == null) { + maintenanceWindowBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder>( + getMaintenanceWindow(), getParentForChildren(), isClean()); + maintenanceWindow_ = null; + } + return maintenanceWindowBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloadsConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder> + workloadsConfigBuilder_; + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the workloadsConfig field is set. + */ + public boolean hasWorkloadsConfig() { + return workloadsConfigBuilder_ != null || workloadsConfig_ != null; + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The workloadsConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + getWorkloadsConfig() { + if (workloadsConfigBuilder_ == null) { + return workloadsConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .getDefaultInstance() + : workloadsConfig_; + } else { + return workloadsConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWorkloadsConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig value) { + if (workloadsConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + workloadsConfig_ = value; + onChanged(); + } else { + workloadsConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWorkloadsConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder + builderForValue) { + if (workloadsConfigBuilder_ == null) { + workloadsConfig_ = builderForValue.build(); + onChanged(); + } else { + workloadsConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWorkloadsConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig value) { + if (workloadsConfigBuilder_ == null) { + if (workloadsConfig_ != null) { + workloadsConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.newBuilder( + workloadsConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + workloadsConfig_ = value; + } + onChanged(); + } else { + workloadsConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWorkloadsConfig() { + if (workloadsConfigBuilder_ == null) { + workloadsConfig_ = null; + onChanged(); + } else { + workloadsConfig_ = null; + workloadsConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder + getWorkloadsConfigBuilder() { + + onChanged(); + return getWorkloadsConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder + getWorkloadsConfigOrBuilder() { + if (workloadsConfigBuilder_ != null) { + return workloadsConfigBuilder_.getMessageOrBuilder(); + } else { + return workloadsConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .getDefaultInstance() + : workloadsConfig_; + } + } + /** + * + * + *
+     * Optional. The workloads configuration settings for the GKE cluster associated with
+     * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+     * server and workers workloads.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder> + getWorkloadsConfigFieldBuilder() { + if (workloadsConfigBuilder_ == null) { + workloadsConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder>( + getWorkloadsConfig(), getParentForChildren(), isClean()); + workloadsConfig_ = null; + } + return workloadsConfigBuilder_; + } + + private int environmentSize_ = 0; + /** + * + * + *
+     * Optional. The size of the Cloud Composer environment.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for environmentSize. + */ + @java.lang.Override + public int getEnvironmentSizeValue() { + return environmentSize_; + } + /** + * + * + *
+     * Optional. The size of the Cloud Composer environment.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for environmentSize to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentSizeValue(int value) { + + environmentSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The size of the Cloud Composer environment.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The environmentSize. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + getEnvironmentSize() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + result = + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + .EnvironmentSize.valueOf(environmentSize_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The size of the Cloud Composer environment.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The environmentSize to set. + * @return This builder for chaining. + */ + public Builder setEnvironmentSize( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + value) { + if (value == null) { + throw new NullPointerException(); + } + + environmentSize_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The size of the Cloud Composer environment.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnvironmentSize() { + + environmentSize_ = 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.orchestration.airflow.service.v1beta1.EnvironmentConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvironmentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnvironmentConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java new file mode 100644 index 00000000..8689c501 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentConfigOrBuilder.java @@ -0,0 +1,580 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface EnvironmentConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The gkeCluster. + */ + java.lang.String getGkeCluster(); + /** + * + * + *
+   * Output only. The Kubernetes Engine cluster used to run this environment.
+   * 
+ * + * string gke_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for gkeCluster. + */ + com.google.protobuf.ByteString getGkeClusterBytes(); + + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dagGcsPrefix. + */ + java.lang.String getDagGcsPrefix(); + /** + * + * + *
+   * Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud
+   * Storage objects reside in a flat namespace, a hierarchical file tree
+   * can be simulated using "/"-delimited object name prefixes. DAG objects for
+   * this environment reside in a simulated directory with the given prefix.
+   * 
+ * + * string dag_gcs_prefix = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dagGcsPrefix. + */ + com.google.protobuf.ByteString getDagGcsPrefixBytes(); + + /** + * + * + *
+   * The number of nodes in the Kubernetes Engine cluster that will be
+   * used to run this environment.
+   * 
+ * + * int32 node_count = 3; + * + * @return The nodeCount. + */ + int getNodeCount(); + + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + * + * @return Whether the softwareConfig field is set. + */ + boolean hasSoftwareConfig(); + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + * + * @return The softwareConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig getSoftwareConfig(); + /** + * + * + *
+   * The configuration settings for software inside the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig software_config = 4; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder + getSoftwareConfigOrBuilder(); + + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + * + * @return Whether the nodeConfig field is set. + */ + boolean hasNodeConfig(); + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + * + * @return The nodeConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig getNodeConfig(); + /** + * + * + *
+   * The configuration used for the Kubernetes Engine cluster.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.NodeConfig node_config = 5; + */ + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder + getNodeConfigOrBuilder(); + + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return Whether the privateEnvironmentConfig field is set. + */ + boolean hasPrivateEnvironmentConfig(); + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + * + * @return The privateEnvironmentConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + getPrivateEnvironmentConfig(); + /** + * + * + *
+   * The configuration used for the Private IP Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig private_environment_config = 7; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfigOrBuilder + getPrivateEnvironmentConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerNetworkAccessControl field is set. + */ + boolean hasWebServerNetworkAccessControl(); + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerNetworkAccessControl. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + getWebServerNetworkAccessControl(); + /** + * + * + *
+   * Optional. The network-level access control policy for the Airflow web server. If
+   * unspecified, no network-level access restrictions will be applied.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl web_server_network_access_control = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControlOrBuilder + getWebServerNetworkAccessControlOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the databaseConfig field is set. + */ + boolean hasDatabaseConfig(); + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The databaseConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig getDatabaseConfig(); + /** + * + * + *
+   * Optional. The configuration settings for Cloud SQL instance used internally by Apache
+   * Airflow software.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig database_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfigOrBuilder + getDatabaseConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServerConfig field is set. + */ + boolean hasWebServerConfig(); + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServerConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig getWebServerConfig(); + /** + * + * + *
+   * Optional. The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig web_server_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder + getWebServerConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The airflowUri. + */ + java.lang.String getAirflowUri(); + /** + * + * + *
+   * Output only. The URI of the Apache Airflow Web UI hosted within this environment (see
+   * [Airflow web
+   * interface](/composer/docs/how-to/accessing/airflow-web-interface)).
+   * 
+ * + * string airflow_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for airflowUri. + */ + com.google.protobuf.ByteString getAirflowUriBytes(); + + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment and its
+   * dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the encryptionConfig field is set. + */ + boolean hasEncryptionConfig(); + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment and its
+   * dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The encryptionConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig getEncryptionConfig(); + /** + * + * + *
+   * Optional. The encryption options for the Cloud Composer environment and its
+   * dependencies. Cannot be updated.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig encryption_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfigOrBuilder + getEncryptionConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The maintenance window is the period when Cloud Composer components may
+   * undergo maintenance. It is defined so that maintenance is not executed
+   * during peak hours or critical time periods.
+   * The system will not be under maintenance for every occurrence of this
+   * window, but when maintenance is planned, it will be scheduled
+   * during the window.
+   * The maintenance window period must encompass at least 12 hours per week.
+   * This may be split into multiple chunks, each with a size of
+   * at least 4 hours.
+   * If this value is omitted, Cloud Composer components may be subject to
+   * maintenance at any time.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the maintenanceWindow field is set. + */ + boolean hasMaintenanceWindow(); + /** + * + * + *
+   * Optional. The maintenance window is the period when Cloud Composer components may
+   * undergo maintenance. It is defined so that maintenance is not executed
+   * during peak hours or critical time periods.
+   * The system will not be under maintenance for every occurrence of this
+   * window, but when maintenance is planned, it will be scheduled
+   * during the window.
+   * The maintenance window period must encompass at least 12 hours per week.
+   * This may be split into multiple chunks, each with a size of
+   * at least 4 hours.
+   * If this value is omitted, Cloud Composer components may be subject to
+   * maintenance at any time.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The maintenanceWindow. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow getMaintenanceWindow(); + /** + * + * + *
+   * Optional. The maintenance window is the period when Cloud Composer components may
+   * undergo maintenance. It is defined so that maintenance is not executed
+   * during peak hours or critical time periods.
+   * The system will not be under maintenance for every occurrence of this
+   * window, but when maintenance is planned, it will be scheduled
+   * during the window.
+   * The maintenance window period must encompass at least 12 hours per week.
+   * This may be split into multiple chunks, each with a size of
+   * at least 4 hours.
+   * If this value is omitted, Cloud Composer components may be subject to
+   * maintenance at any time.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow maintenance_window = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder + getMaintenanceWindowOrBuilder(); + + /** + * + * + *
+   * Optional. The workloads configuration settings for the GKE cluster associated with
+   * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+   * server and workers workloads.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the workloadsConfig field is set. + */ + boolean hasWorkloadsConfig(); + /** + * + * + *
+   * Optional. The workloads configuration settings for the GKE cluster associated with
+   * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+   * server and workers workloads.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The workloadsConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig getWorkloadsConfig(); + /** + * + * + *
+   * Optional. The workloads configuration settings for the GKE cluster associated with
+   * the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web
+   * server and workers workloads.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder + getWorkloadsConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The size of the Cloud Composer environment.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for environmentSize. + */ + int getEnvironmentSizeValue(); + /** + * + * + *
+   * Optional. The size of the Cloud Composer environment.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The environmentSize. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + getEnvironmentSize(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java new file mode 100644 index 00000000..f54586fb --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EnvironmentName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_ENVIRONMENT = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/environments/{environment}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String environment; + + @Deprecated + protected EnvironmentName() { + project = null; + location = null; + environment = null; + } + + private EnvironmentName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + environment = Preconditions.checkNotNull(builder.getEnvironment()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EnvironmentName of(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build(); + } + + public static String format(String project, String location, String environment) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setEnvironment(environment) + .build() + .toString(); + } + + public static EnvironmentName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_ENVIRONMENT.validatedMatch( + formattedString, "EnvironmentName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("environment")); + } + + 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 (EnvironmentName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_ENVIRONMENT.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 (environment != null) { + fieldMapBuilder.put("environment", environment); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_ENVIRONMENT.instantiate( + "project", project, "location", location, "environment", environment); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EnvironmentName that = ((EnvironmentName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.environment, that.environment); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(environment); + return h; + } + + /** Builder for projects/{project}/locations/{location}/environments/{environment}. */ + public static class Builder { + private String project; + private String location; + private String environment; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getEnvironment() { + return environment; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setEnvironment(String environment) { + this.environment = environment; + return this; + } + + private Builder(EnvironmentName environmentName) { + this.project = environmentName.project; + this.location = environmentName.location; + this.environment = environmentName.environment; + } + + public EnvironmentName build() { + return new EnvironmentName(this); + } + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentOrBuilder.java new file mode 100644 index 00000000..fb66b304 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentOrBuilder.java @@ -0,0 +1,304 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface EnvironmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.Environment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the environment, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * EnvironmentId must start with a lowercase letter followed by up to 63
+   * lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + * @return Whether the config field is set. + */ + boolean hasConfig(); + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + * + * @return The config. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig getConfig(); + /** + * + * + *
+   * Configuration parameters for this environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig config = 2; + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfigOrBuilder + getConfigOrBuilder(); + + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uuid. + */ + java.lang.String getUuid(); + /** + * + * + *
+   * Output only. The UUID (Universally Unique IDentifier) associated with this environment.
+   * This value is generated when the environment is created.
+   * 
+ * + * string uuid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uuid. + */ + com.google.protobuf.ByteString getUuidBytes(); + + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * The current state of the environment.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment.State state = 4; + * + * @return The state. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.State getState(); + + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which this environment was last modified.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User-defined labels for this environment.
+   * The labels map can contain no more than 64 entries. Entries of the labels
+   * map are UTF8 strings that comply with the following restrictions:
+   * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}
+   * * Values must conform to regexp:  [\p{Ll}\p{Lo}\p{N}_-]{0,63}
+   * * Both keys and values are additionally constrained to be <= 128 bytes in
+   * size.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java new file mode 100644 index 00000000..3f1be44e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/EnvironmentsOuterClass.java @@ -0,0 +1,724 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public final class EnvironmentsOuterClass { + private EnvironmentsOuterClass() {} + + 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_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_AirflowConfigOverridesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_PypiPackagesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_PypiPackagesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_EnvVariablesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_EnvVariablesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_PypiDependenciesEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nEgoogle/cloud/orchestration/airflow/ser" + + "vice/v1beta1/environments.proto\0222google." + + "cloud.orchestration.airflow.service.v1be" + + "ta1\032\034google/api/annotations.proto\032\027googl" + + "e/api/client.proto\032\037google/api/field_beh" + + "avior.proto\032\031google/api/resource.proto\032#" + + "google/longrunning/operations.proto\032 goo" + + "gle/protobuf/field_mask.proto\032\037google/pr" + + "otobuf/timestamp.proto\"\200\001\n\030CreateEnviron" + + "mentRequest\022\016\n\006parent\030\001 \001(\t\022T\n\013environme" + + "nt\030\002 \001(\0132?.google.cloud.orchestration.ai" + + "rflow.service.v1beta1.Environment\"%\n\025Get" + + "EnvironmentRequest\022\014\n\004name\030\001 \001(\t\"P\n\027List" + + "EnvironmentsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tp" + + "age_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\212\001\n\030L" + + "istEnvironmentsResponse\022U\n\014environments\030" + + "\001 \003(\0132?.google.cloud.orchestration.airfl" + + "ow.service.v1beta1.Environment\022\027\n\017next_p" + + "age_token\030\002 \001(\t\"(\n\030DeleteEnvironmentRequ" + + "est\022\014\n\004name\030\001 \001(\t\"\264\001\n\030UpdateEnvironmentR" + + "equest\022\014\n\004name\030\002 \001(\t\022T\n\013environment\030\001 \001(" + + "\0132?.google.cloud.orchestration.airflow.s" + + "ervice.v1beta1.Environment\0224\n\013update_mas" + + "k\030\003 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002" + + "\"\'\n\027RestartWebServerRequest\022\014\n\004name\030\001 \001(" + + "\t\"\232\n\n\021EnvironmentConfig\022\030\n\013gke_cluster\030\001" + + " \001(\tB\003\340A\003\022\033\n\016dag_gcs_prefix\030\002 \001(\tB\003\340A\003\022\022" + + "\n\nnode_count\030\003 \001(\005\022[\n\017software_config\030\004 " + + "\001(\0132B.google.cloud.orchestration.airflow" + + ".service.v1beta1.SoftwareConfig\022S\n\013node_" + + "config\030\005 \001(\0132>.google.cloud.orchestratio" + + "n.airflow.service.v1beta1.NodeConfig\022p\n\032" + + "private_environment_config\030\007 \001(\0132L.googl" + + "e.cloud.orchestration.airflow.service.v1" + + "beta1.PrivateEnvironmentConfig\022\201\001\n!web_s" + + "erver_network_access_control\030\t \001(\0132Q.goo" + + "gle.cloud.orchestration.airflow.service." + + "v1beta1.WebServerNetworkAccessControlB\003\340" + + "A\001\022`\n\017database_config\030\n \001(\0132B.google.clo" + + "ud.orchestration.airflow.service.v1beta1" + + ".DatabaseConfigB\003\340A\001\022c\n\021web_server_confi" + + "g\030\013 \001(\0132C.google.cloud.orchestration.air" + + "flow.service.v1beta1.WebServerConfigB\003\340A" + + "\001\022\030\n\013airflow_uri\030\006 \001(\tB\003\340A\003\022d\n\021encryptio" + + "n_config\030\014 \001(\0132D.google.cloud.orchestrat" + + "ion.airflow.service.v1beta1.EncryptionCo" + + "nfigB\003\340A\001\022f\n\022maintenance_window\030\r \001(\0132E." + + "google.cloud.orchestration.airflow.servi" + + "ce.v1beta1.MaintenanceWindowB\003\340A\001\022b\n\020wor" + + "kloads_config\030\017 \001(\0132C.google.cloud.orche" + + "stration.airflow.service.v1beta1.Workloa" + + "dsConfigB\003\340A\001\022t\n\020environment_size\030\020 \001(\0162" + + "U.google.cloud.orchestration.airflow.ser" + + "vice.v1beta1.EnvironmentConfig.Environme" + + "ntSizeB\003\340A\001\"\210\001\n\017EnvironmentSize\022 \n\034ENVIR" + + "ONMENT_SIZE_UNSPECIFIED\020\000\022\032\n\026ENVIRONMENT" + + "_SIZE_SMALL\020\001\022\033\n\027ENVIRONMENT_SIZE_MEDIUM" + + "\020\002\022\032\n\026ENVIRONMENT_SIZE_LARGE\020\003\"\327\001\n\035WebSe" + + "rverNetworkAccessControl\022{\n\021allowed_ip_r" + + "anges\030\001 \003(\0132`.google.cloud.orchestration" + + ".airflow.service.v1beta1.WebServerNetwor" + + "kAccessControl.AllowedIpRange\0329\n\016Allowed" + + "IpRange\022\r\n\005value\030\001 \001(\t\022\030\n\013description\030\002 " + + "\001(\tB\003\340A\001\"\331\004\n\016SoftwareConfig\022\025\n\rimage_ver" + + "sion\030\001 \001(\t\022\205\001\n\030airflow_config_overrides\030" + + "\002 \003(\0132^.google.cloud.orchestration.airfl" + + "ow.service.v1beta1.SoftwareConfig.Airflo" + + "wConfigOverridesEntryB\003\340A\001\022p\n\rpypi_packa" + + "ges\030\003 \003(\0132T.google.cloud.orchestration.a" + + "irflow.service.v1beta1.SoftwareConfig.Py" + + "piPackagesEntryB\003\340A\001\022p\n\renv_variables\030\004 " + + "\003(\0132T.google.cloud.orchestration.airflow" + + ".service.v1beta1.SoftwareConfig.EnvVaria" + + "blesEntryB\003\340A\001\022\033\n\016python_version\030\006 \001(\tB\003" + + "\340A\001\032=\n\033AirflowConfigOverridesEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0323\n\021PypiPackag" + + "esEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032" + + "3\n\021EnvVariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\"\325\001\n\022IPAllocationPolicy\022\033\n\016u" + + "se_ip_aliases\030\001 \001(\010B\003\340A\001\022)\n\034cluster_seco" + + "ndary_range_name\030\002 \001(\tB\003\340A\001\022*\n\035services_" + + "secondary_range_name\030\003 \001(\tB\003\340A\001\022$\n\027clust" + + "er_ipv4_cidr_block\030\004 \001(\tB\003\340A\001\022%\n\030service" + + "s_ipv4_cidr_block\030\005 \001(\tB\003\340A\001\"\337\002\n\nNodeCon" + + "fig\022\025\n\010location\030\001 \001(\tB\003\340A\001\022\031\n\014machine_ty" + + "pe\030\002 \001(\tB\003\340A\001\022\024\n\007network\030\003 \001(\tB\003\340A\001\022\027\n\ns" + + "ubnetwork\030\004 \001(\tB\003\340A\001\022\031\n\014disk_size_gb\030\005 \001" + + "(\005B\003\340A\001\022\031\n\014oauth_scopes\030\006 \003(\tB\003\340A\001\022\034\n\017se" + + "rvice_account\030\007 \001(\tB\003\340A\001\022\021\n\004tags\030\010 \003(\tB\003" + + "\340A\001\022i\n\024ip_allocation_policy\030\t \001(\0132F.goog" + + "le.cloud.orchestration.airflow.service.v" + + "1beta1.IPAllocationPolicyB\003\340A\001\022\036\n\021max_po" + + "ds_per_node\030\n \001(\005B\003\340A\001\"\212\001\n\024PrivateCluste" + + "rConfig\022$\n\027enable_private_endpoint\030\001 \001(\010" + + "B\003\340A\001\022#\n\026master_ipv4_cidr_block\030\002 \001(\tB\003\340" + + "A\001\022\'\n\032master_ipv4_reserved_range\030\003 \001(\tB\003" + + "\340A\003\"\236\003\n\030PrivateEnvironmentConfig\022\'\n\032enab" + + "le_private_environment\030\001 \001(\010B\003\340A\001\022m\n\026pri" + + "vate_cluster_config\030\002 \001(\0132H.google.cloud" + + ".orchestration.airflow.service.v1beta1.P" + + "rivateClusterConfigB\003\340A\001\022\'\n\032web_server_i" + + "pv4_cidr_block\030\003 \001(\tB\003\340A\001\022&\n\031cloud_sql_i" + + "pv4_cidr_block\030\004 \001(\tB\003\340A\001\022+\n\036web_server_" + + "ipv4_reserved_range\030\005 \001(\tB\003\340A\003\0223\n&cloud_" + + "composer_network_ipv4_cidr_block\030\007 \001(\tB\003" + + "\340A\001\0227\n*cloud_composer_network_ipv4_reser" + + "ved_range\030\010 \001(\tB\003\340A\003\"+\n\016DatabaseConfig\022\031" + + "\n\014machine_type\030\001 \001(\tB\003\340A\001\",\n\017WebServerCo" + + "nfig\022\031\n\014machine_type\030\001 \001(\tB\003\340A\001\"-\n\020Encry" + + "ptionConfig\022\031\n\014kms_key_name\030\001 \001(\tB\003\340A\001\"\224" + + "\001\n\021MaintenanceWindow\0223\n\nstart_time\030\001 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\002\0221\n\010end" + + "_time\030\002 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\002\022\027\n\nrecurrence\030\003 \001(\tB\003\340A\002\"\243\005\n\017Worklo" + + "adsConfig\022m\n\tscheduler\030\001 \001(\0132U.google.cl" + + "oud.orchestration.airflow.service.v1beta" + + "1.WorkloadsConfig.SchedulerResourceB\003\340A\001" + + "\022n\n\nweb_server\030\002 \001(\0132U.google.cloud.orch" + + "estration.airflow.service.v1beta1.Worklo" + + "adsConfig.WebServerResourceB\003\340A\001\022g\n\006work" + + "er\030\003 \001(\0132R.google.cloud.orchestration.ai" + + "rflow.service.v1beta1.WorkloadsConfig.Wo" + + "rkerResourceB\003\340A\001\032j\n\021SchedulerResource\022\020" + + "\n\003cpu\030\001 \001(\002B\003\340A\001\022\026\n\tmemory_gb\030\002 \001(\002B\003\340A\001" + + "\022\027\n\nstorage_gb\030\003 \001(\002B\003\340A\001\022\022\n\005count\030\004 \001(\005" + + "B\003\340A\001\032V\n\021WebServerResource\022\020\n\003cpu\030\001 \001(\002B" + + "\003\340A\001\022\026\n\tmemory_gb\030\002 \001(\002B\003\340A\001\022\027\n\nstorage_" + + "gb\030\003 \001(\002B\003\340A\001\032\203\001\n\016WorkerResource\022\020\n\003cpu\030" + + "\001 \001(\002B\003\340A\001\022\026\n\tmemory_gb\030\002 \001(\002B\003\340A\001\022\027\n\nst" + + "orage_gb\030\003 \001(\002B\003\340A\001\022\026\n\tmin_count\030\004 \001(\005B\003" + + "\340A\001\022\026\n\tmax_count\030\005 \001(\005B\003\340A\001\"\250\005\n\013Environm" + + "ent\022\014\n\004name\030\001 \001(\t\022U\n\006config\030\002 \001(\0132E.goog" + + "le.cloud.orchestration.airflow.service.v" + + "1beta1.EnvironmentConfig\022\021\n\004uuid\030\003 \001(\tB\003" + + "\340A\003\022T\n\005state\030\004 \001(\0162E.google.cloud.orches" + + "tration.airflow.service.v1beta1.Environm" + + "ent.State\0224\n\013create_time\030\005 \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022`\n" + + "\006labels\030\007 \003(\0132K.google.cloud.orchestrati" + + "on.airflow.service.v1beta1.Environment.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\"`\n\005State\022\025\n\021STATE" + + "_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\013\n\007RUNNING\020" + + "\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\t\n\005ERROR\020\005" + + ":l\352Ai\n#composer.googleapis.com/Environme" + + "nt\022Bprojects/{project}/locations/{locati" + + "on}/environments/{environment}\"A\n\023CheckU" + + "pgradeRequest\022\023\n\013environment\030\001 \001(\t\022\025\n\rim" + + "age_version\030\002 \001(\t\"\204\004\n\024CheckUpgradeRespon" + + "se\022\032\n\rbuild_log_uri\030\001 \001(\tB\003\340A\003\022\204\001\n\036conta" + + "ins_pypi_modules_conflict\030\004 \001(\0162W.google" + + ".cloud.orchestration.airflow.service.v1b" + + "eta1.CheckUpgradeResponse.ConflictResult" + + "B\003\340A\003\022,\n\037pypi_conflict_build_log_extract" + + "\030\003 \001(\tB\003\340A\003\022\025\n\rimage_version\030\005 \001(\t\022y\n\021py" + + "pi_dependencies\030\006 \003(\0132^.google.cloud.orc" + + "hestration.airflow.service.v1beta1.Check" + + "UpgradeResponse.PypiDependenciesEntry\0327\n" + + "\025PypiDependenciesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"P\n\016ConflictResult\022\037\n\033CONF" + + "LICT_RESULT_UNSPECIFIED\020\000\022\014\n\010CONFLICT\020\001\022" + + "\017\n\013NO_CONFLICT\020\0022\360\020\n\014Environments\022\270\002\n\021Cr" + + "eateEnvironment\022L.google.cloud.orchestra" + + "tion.airflow.service.v1beta1.CreateEnvir" + + "onmentRequest\032\035.google.longrunning.Opera" + + "tion\"\265\001\202\323\344\223\002D\"5/v1beta1/{parent=projects" + + "/*/locations/*}/environments:\013environmen" + + "t\332A\022parent,environment\312AS\n\013Environment\022D" + + "google.cloud.orchestration.airflow.servi" + + "ce.v1beta1.OperationMetadata\022\342\001\n\016GetEnvi" + + "ronment\022I.google.cloud.orchestration.air" + + "flow.service.v1beta1.GetEnvironmentReque" + + "st\032?.google.cloud.orchestration.airflow." + + "service.v1beta1.Environment\"D\202\323\344\223\0027\0225/v1" + + "beta1/{name=projects/*/locations/*/envir" + + "onments/*}\332A\004name\022\365\001\n\020ListEnvironments\022K" + + ".google.cloud.orchestration.airflow.serv" + + "ice.v1beta1.ListEnvironmentsRequest\032L.go" + + "ogle.cloud.orchestration.airflow.service" + + ".v1beta1.ListEnvironmentsResponse\"F\202\323\344\223\002" + + "7\0225/v1beta1/{parent=projects/*/locations" + + "/*}/environments\332A\006parent\022\302\002\n\021UpdateEnvi" + + "ronment\022L.google.cloud.orchestration.air" + + "flow.service.v1beta1.UpdateEnvironmentRe" + + "quest\032\035.google.longrunning.Operation\"\277\001\202" + + "\323\344\223\002D25/v1beta1/{name=projects/*/locatio" + + "ns/*/environments/*}:\013environment\332A\034name" + + ",environment,update_mask\312AS\n\013Environment" + + "\022Dgoogle.cloud.orchestration.airflow.ser" + + "vice.v1beta1.OperationMetadata\022\247\002\n\021Delet" + + "eEnvironment\022L.google.cloud.orchestratio" + + "n.airflow.service.v1beta1.DeleteEnvironm" + + "entRequest\032\035.google.longrunning.Operatio" + + "n\"\244\001\202\323\344\223\0027*5/v1beta1/{name=projects/*/lo" + + "cations/*/environments/*}\332A\004name\312A]\n\025goo" + + "gle.protobuf.Empty\022Dgoogle.cloud.orchest" + + "ration.airflow.service.v1beta1.Operation" + + "Metadata\022\250\002\n\020RestartWebServer\022K.google.c" + + "loud.orchestration.airflow.service.v1bet" + + "a1.RestartWebServerRequest\032\035.google.long" + + "running.Operation\"\247\001\202\323\344\223\002K\"F/v1beta1/{na" + + "me=projects/*/locations/*/environments/*" + + "}:restartWebServer:\001*\312AS\n\013Environment\022Dg" + + "oogle.cloud.orchestration.airflow.servic" + + "e.v1beta1.OperationMetadata\022\340\002\n\014CheckUpg" + + "rade\022G.google.cloud.orchestration.airflo" + + "w.service.v1beta1.CheckUpgradeRequest\032\035." + + "google.longrunning.Operation\"\347\001\202\323\344\223\002N\"I/" + + "v1beta1/{environment=projects/*/location" + + "s/*/environments/*}:checkUpgrade:\001*\312A\217\001\n" + + "Ggoogle.cloud.orchestration.airflow.serv" + + "ice.v1beta1.CheckUpgradeResponse\022Dgoogle" + + ".cloud.orchestration.airflow.service.v1b" + + "eta1.OperationMetadata\032K\312A\027composer.goog" + + "leapis.com\322A.https://www.googleapis.com/" + + "auth/cloud-platformB\225\001\n6com.google.cloud" + + ".orchestration.airflow.service.v1beta1P\001" + + "ZYgoogle.golang.org/genproto/googleapis/" + + "cloud/orchestration/airflow/service/v1be" + + "ta1;serviceb\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.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CreateEnvironmentRequest_descriptor, + new java.lang.String[] { + "Parent", "Environment", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_descriptor, + new java.lang.String[] { + "Environments", "NextPageToken", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DeleteEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_descriptor, + new java.lang.String[] { + "Name", "Environment", "UpdateMask", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EnvironmentConfig_descriptor, + new java.lang.String[] { + "GkeCluster", + "DagGcsPrefix", + "NodeCount", + "SoftwareConfig", + "NodeConfig", + "PrivateEnvironmentConfig", + "WebServerNetworkAccessControl", + "DatabaseConfig", + "WebServerConfig", + "AirflowUri", + "EncryptionConfig", + "MaintenanceWindow", + "WorkloadsConfig", + "EnvironmentSize", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor, + new java.lang.String[] { + "AllowedIpRanges", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_descriptor, + new java.lang.String[] { + "Value", "Description", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor, + new java.lang.String[] { + "ImageVersion", + "AirflowConfigOverrides", + "PypiPackages", + "EnvVariables", + "PythonVersion", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_AirflowConfigOverridesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_PypiPackagesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_PypiPackagesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_PypiPackagesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_EnvVariablesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_EnvVariablesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_EnvVariablesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor, + new java.lang.String[] { + "UseIpAliases", + "ClusterSecondaryRangeName", + "ServicesSecondaryRangeName", + "ClusterIpv4CidrBlock", + "ServicesIpv4CidrBlock", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor, + new java.lang.String[] { + "Location", + "MachineType", + "Network", + "Subnetwork", + "DiskSizeGb", + "OauthScopes", + "ServiceAccount", + "Tags", + "IpAllocationPolicy", + "MaxPodsPerNode", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor, + new java.lang.String[] { + "EnablePrivateEndpoint", "MasterIpv4CidrBlock", "MasterIpv4ReservedRange", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor, + new java.lang.String[] { + "EnablePrivateEnvironment", + "PrivateClusterConfig", + "WebServerIpv4CidrBlock", + "CloudSqlIpv4CidrBlock", + "WebServerIpv4ReservedRange", + "CloudComposerNetworkIpv4CidrBlock", + "CloudComposerNetworkIpv4ReservedRange", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_DatabaseConfig_descriptor, + new java.lang.String[] { + "MachineType", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor, + new java.lang.String[] { + "MachineType", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_EncryptionConfig_descriptor, + new java.lang.String[] { + "KmsKeyName", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor, + new java.lang.String[] { + "StartTime", "EndTime", "Recurrence", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor, + new java.lang.String[] { + "Scheduler", "WebServer", "Worker", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_descriptor, + new java.lang.String[] { + "Cpu", "MemoryGb", "StorageGb", "Count", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_descriptor, + new java.lang.String[] { + "Cpu", "MemoryGb", "StorageGb", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_descriptor, + new java.lang.String[] { + "Cpu", "MemoryGb", "StorageGb", "MinCount", "MaxCount", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor, + new java.lang.String[] { + "Name", "Config", "Uuid", "State", "CreateTime", "UpdateTime", "Labels", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_LabelsEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_Environment_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeRequest_descriptor, + new java.lang.String[] { + "Environment", "ImageVersion", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor, + new java.lang.String[] { + "BuildLogUri", + "ContainsPypiModulesConflict", + "PypiConflictBuildLogExtract", + "ImageVersion", + "PypiDependencies", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor = + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_PypiDependenciesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_CheckUpgradeResponse_PypiDependenciesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.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.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/GetEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/GetEnvironmentRequest.java new file mode 100644 index 00000000..2ee70e4e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/GetEnvironmentRequest.java @@ -0,0 +1,668 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Get an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} + */ +public final class GetEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + GetEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEnvironmentRequest.newBuilder() to construct. + private GetEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEnvironmentRequest( + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) 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.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Get an environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_GetEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(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.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + .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.orchestration.airflow.service.v1beta1.GetEnvironmentRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to get, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/GetEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/GetEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..64bc4b40 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/GetEnvironmentRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface GetEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the environment to get, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/IPAllocationPolicy.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/IPAllocationPolicy.java new file mode 100644 index 00000000..20b92e03 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/IPAllocationPolicy.java @@ -0,0 +1,1514 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Configuration for controlling how IPs are allocated in the
+ * GKE cluster.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} + */ +public final class IPAllocationPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + IPAllocationPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use IPAllocationPolicy.newBuilder() to construct. + private IPAllocationPolicy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IPAllocationPolicy() { + clusterSecondaryRangeName_ = ""; + servicesSecondaryRangeName_ = ""; + clusterIpv4CidrBlock_ = ""; + servicesIpv4CidrBlock_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IPAllocationPolicy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IPAllocationPolicy( + 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: + { + useIpAliases_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterSecondaryRangeName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + servicesSecondaryRangeName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + clusterIpv4CidrBlock_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + servicesIpv4CidrBlock_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.class, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder + .class); + } + + public static final int USE_IP_ALIASES_FIELD_NUMBER = 1; + private boolean useIpAliases_; + /** + * + * + *
+   * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+   * If `true`, a VPC-native cluster is created.
+   * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useIpAliases. + */ + @java.lang.Override + public boolean getUseIpAliases() { + return useIpAliases_; + } + + public static final int CLUSTER_SECONDARY_RANGE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object clusterSecondaryRangeName_; + /** + * + * + *
+   * Optional. The name of the cluster's secondary range used to allocate
+   * IP addresses to pods. Specify either `cluster_secondary_range_name`
+   * or `cluster_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterSecondaryRangeName. + */ + @java.lang.Override + public java.lang.String getClusterSecondaryRangeName() { + java.lang.Object ref = clusterSecondaryRangeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterSecondaryRangeName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The name of the cluster's secondary range used to allocate
+   * IP addresses to pods. Specify either `cluster_secondary_range_name`
+   * or `cluster_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterSecondaryRangeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterSecondaryRangeNameBytes() { + java.lang.Object ref = clusterSecondaryRangeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterSecondaryRangeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICES_SECONDARY_RANGE_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object servicesSecondaryRangeName_; + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the cluster. Specify either `services_secondary_range_name`
+   * or `services_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servicesSecondaryRangeName. + */ + @java.lang.Override + public java.lang.String getServicesSecondaryRangeName() { + java.lang.Object ref = servicesSecondaryRangeName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesSecondaryRangeName_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the cluster. Specify either `services_secondary_range_name`
+   * or `services_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for servicesSecondaryRangeName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServicesSecondaryRangeNameBytes() { + java.lang.Object ref = servicesSecondaryRangeName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servicesSecondaryRangeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_IPV4_CIDR_BLOCK_FIELD_NUMBER = 4; + private volatile java.lang.Object clusterIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getClusterIpv4CidrBlock() { + java.lang.Object ref = clusterIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getClusterIpv4CidrBlockBytes() { + java.lang.Object ref = clusterIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICES_IPV4_CIDR_BLOCK_FIELD_NUMBER = 5; + private volatile java.lang.Object servicesIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The servicesIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getServicesIpv4CidrBlock() { + java.lang.Object ref = servicesIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for servicesIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServicesIpv4CidrBlockBytes() { + java.lang.Object ref = servicesIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servicesIpv4CidrBlock_ = 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 (useIpAliases_ != false) { + output.writeBool(1, useIpAliases_); + } + if (!getClusterSecondaryRangeNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterSecondaryRangeName_); + } + if (!getServicesSecondaryRangeNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servicesSecondaryRangeName_); + } + if (!getClusterIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, clusterIpv4CidrBlock_); + } + if (!getServicesIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, servicesIpv4CidrBlock_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (useIpAliases_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, useIpAliases_); + } + if (!getClusterSecondaryRangeNameBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterSecondaryRangeName_); + } + if (!getServicesSecondaryRangeNameBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servicesSecondaryRangeName_); + } + if (!getClusterIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, clusterIpv4CidrBlock_); + } + if (!getServicesIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, servicesIpv4CidrBlock_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy other = + (com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) obj; + + if (getUseIpAliases() != other.getUseIpAliases()) return false; + if (!getClusterSecondaryRangeName().equals(other.getClusterSecondaryRangeName())) return false; + if (!getServicesSecondaryRangeName().equals(other.getServicesSecondaryRangeName())) + return false; + if (!getClusterIpv4CidrBlock().equals(other.getClusterIpv4CidrBlock())) return false; + if (!getServicesIpv4CidrBlock().equals(other.getServicesIpv4CidrBlock())) return false; + if (!unknownFields.equals(other.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) + USE_IP_ALIASES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseIpAliases()); + hash = (37 * hash) + CLUSTER_SECONDARY_RANGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getClusterSecondaryRangeName().hashCode(); + hash = (37 * hash) + SERVICES_SECONDARY_RANGE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServicesSecondaryRangeName().hashCode(); + hash = (37 * hash) + CLUSTER_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getClusterIpv4CidrBlock().hashCode(); + hash = (37 * hash) + SERVICES_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getServicesIpv4CidrBlock().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 controlling how IPs are allocated in the
+   * GKE cluster.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.class, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + useIpAliases_ = false; + + clusterSecondaryRangeName_ = ""; + + servicesSecondaryRangeName_ = ""; + + clusterIpv4CidrBlock_ = ""; + + servicesIpv4CidrBlock_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_IPAllocationPolicy_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy build() { + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy result = + new com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(this); + result.useIpAliases_ = useIpAliases_; + result.clusterSecondaryRangeName_ = clusterSecondaryRangeName_; + result.servicesSecondaryRangeName_ = servicesSecondaryRangeName_; + result.clusterIpv4CidrBlock_ = clusterIpv4CidrBlock_; + result.servicesIpv4CidrBlock_ = servicesIpv4CidrBlock_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + .getDefaultInstance()) return this; + if (other.getUseIpAliases() != false) { + setUseIpAliases(other.getUseIpAliases()); + } + if (!other.getClusterSecondaryRangeName().isEmpty()) { + clusterSecondaryRangeName_ = other.clusterSecondaryRangeName_; + onChanged(); + } + if (!other.getServicesSecondaryRangeName().isEmpty()) { + servicesSecondaryRangeName_ = other.servicesSecondaryRangeName_; + onChanged(); + } + if (!other.getClusterIpv4CidrBlock().isEmpty()) { + clusterIpv4CidrBlock_ = other.clusterIpv4CidrBlock_; + onChanged(); + } + if (!other.getServicesIpv4CidrBlock().isEmpty()) { + servicesIpv4CidrBlock_ = other.servicesIpv4CidrBlock_; + 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.orchestration.airflow.service.v1beta1.IPAllocationPolicy parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean useIpAliases_; + /** + * + * + *
+     * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+     * If `true`, a VPC-native cluster is created.
+     * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useIpAliases. + */ + @java.lang.Override + public boolean getUseIpAliases() { + return useIpAliases_; + } + /** + * + * + *
+     * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+     * If `true`, a VPC-native cluster is created.
+     * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The useIpAliases to set. + * @return This builder for chaining. + */ + public Builder setUseIpAliases(boolean value) { + + useIpAliases_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+     * If `true`, a VPC-native cluster is created.
+     * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearUseIpAliases() { + + useIpAliases_ = false; + onChanged(); + return this; + } + + private java.lang.Object clusterSecondaryRangeName_ = ""; + /** + * + * + *
+     * Optional. The name of the cluster's secondary range used to allocate
+     * IP addresses to pods. Specify either `cluster_secondary_range_name`
+     * or `cluster_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The clusterSecondaryRangeName. + */ + public java.lang.String getClusterSecondaryRangeName() { + java.lang.Object ref = clusterSecondaryRangeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterSecondaryRangeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the cluster's secondary range used to allocate
+     * IP addresses to pods. Specify either `cluster_secondary_range_name`
+     * or `cluster_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for clusterSecondaryRangeName. + */ + public com.google.protobuf.ByteString getClusterSecondaryRangeNameBytes() { + java.lang.Object ref = clusterSecondaryRangeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterSecondaryRangeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the cluster's secondary range used to allocate
+     * IP addresses to pods. Specify either `cluster_secondary_range_name`
+     * or `cluster_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The clusterSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setClusterSecondaryRangeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterSecondaryRangeName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the cluster's secondary range used to allocate
+     * IP addresses to pods. Specify either `cluster_secondary_range_name`
+     * or `cluster_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearClusterSecondaryRangeName() { + + clusterSecondaryRangeName_ = getDefaultInstance().getClusterSecondaryRangeName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the cluster's secondary range used to allocate
+     * IP addresses to pods. Specify either `cluster_secondary_range_name`
+     * or `cluster_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for clusterSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setClusterSecondaryRangeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterSecondaryRangeName_ = value; + onChanged(); + return this; + } + + private java.lang.Object servicesSecondaryRangeName_ = ""; + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the cluster. Specify either `services_secondary_range_name`
+     * or `services_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servicesSecondaryRangeName. + */ + public java.lang.String getServicesSecondaryRangeName() { + java.lang.Object ref = servicesSecondaryRangeName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesSecondaryRangeName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the cluster. Specify either `services_secondary_range_name`
+     * or `services_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for servicesSecondaryRangeName. + */ + public com.google.protobuf.ByteString getServicesSecondaryRangeNameBytes() { + java.lang.Object ref = servicesSecondaryRangeName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servicesSecondaryRangeName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the cluster. Specify either `services_secondary_range_name`
+     * or `services_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The servicesSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setServicesSecondaryRangeName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + servicesSecondaryRangeName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the cluster. Specify either `services_secondary_range_name`
+     * or `services_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServicesSecondaryRangeName() { + + servicesSecondaryRangeName_ = getDefaultInstance().getServicesSecondaryRangeName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The name of the services' secondary range used to allocate
+     * IP addresses to the cluster. Specify either `services_secondary_range_name`
+     * or `services_ipv4_cidr_block` but not both.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for servicesSecondaryRangeName to set. + * @return This builder for chaining. + */ + public Builder setServicesSecondaryRangeNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + servicesSecondaryRangeName_ = value; + onChanged(); + return this; + } + + private java.lang.Object clusterIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterIpv4CidrBlock. + */ + public java.lang.String getClusterIpv4CidrBlock() { + java.lang.Object ref = clusterIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getClusterIpv4CidrBlockBytes() { + java.lang.Object ref = clusterIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + clusterIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The clusterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setClusterIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearClusterIpv4CidrBlock() { + + clusterIpv4CidrBlock_ = getDefaultInstance().getClusterIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IP address range used to allocate IP addresses to pods in
+     * the cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for clusterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setClusterIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object servicesIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The servicesIpv4CidrBlock. + */ + public java.lang.String getServicesIpv4CidrBlock() { + java.lang.Object ref = servicesIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + servicesIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for servicesIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getServicesIpv4CidrBlockBytes() { + java.lang.Object ref = servicesIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + servicesIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The servicesIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setServicesIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + servicesIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServicesIpv4CidrBlock() { + + servicesIpv4CidrBlock_ = getDefaultInstance().getServicesIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The IP address range of the services IP addresses in this
+     * cluster.
+     * This field is applicable only when `use_ip_aliases` is true.
+     * Set to blank to have GKE choose a range with the default size.
+     * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+     * netmask.
+     * Set to a
+     * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+     * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+     * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+     * to use.
+     * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+     * but not both.
+     * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for servicesIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setServicesIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + servicesIpv4CidrBlock_ = 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.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IPAllocationPolicy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IPAllocationPolicy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/IPAllocationPolicyOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/IPAllocationPolicyOrBuilder.java new file mode 100644 index 00000000..89c45606 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/IPAllocationPolicyOrBuilder.java @@ -0,0 +1,201 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface IPAllocationPolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Whether or not to enable Alias IPs in the GKE cluster.
+   * If `true`, a VPC-native cluster is created.
+   * 
+ * + * bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The useIpAliases. + */ + boolean getUseIpAliases(); + + /** + * + * + *
+   * Optional. The name of the cluster's secondary range used to allocate
+   * IP addresses to pods. Specify either `cluster_secondary_range_name`
+   * or `cluster_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterSecondaryRangeName. + */ + java.lang.String getClusterSecondaryRangeName(); + /** + * + * + *
+   * Optional. The name of the cluster's secondary range used to allocate
+   * IP addresses to pods. Specify either `cluster_secondary_range_name`
+   * or `cluster_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterSecondaryRangeName. + */ + com.google.protobuf.ByteString getClusterSecondaryRangeNameBytes(); + + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the cluster. Specify either `services_secondary_range_name`
+   * or `services_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The servicesSecondaryRangeName. + */ + java.lang.String getServicesSecondaryRangeName(); + /** + * + * + *
+   * Optional. The name of the services' secondary range used to allocate
+   * IP addresses to the cluster. Specify either `services_secondary_range_name`
+   * or `services_ipv4_cidr_block` but not both.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * 
+ * + * string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for servicesSecondaryRangeName. + */ + com.google.protobuf.ByteString getServicesSecondaryRangeNameBytes(); + + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The clusterIpv4CidrBlock. + */ + java.lang.String getClusterIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The IP address range used to allocate IP addresses to pods in
+   * the cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for clusterIpv4CidrBlock. + */ + com.google.protobuf.ByteString getClusterIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The servicesIpv4CidrBlock. + */ + java.lang.String getServicesIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The IP address range of the services IP addresses in this
+   * cluster.
+   * This field is applicable only when `use_ip_aliases` is true.
+   * Set to blank to have GKE choose a range with the default size.
+   * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific
+   * netmask.
+   * Set to a
+   * [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
+   * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.
+   * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range
+   * to use.
+   * Specify `services_secondary_range_name` or `services_ipv4_cidr_block`
+   * but not both.
+   * 
+ * + * string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for servicesIpv4CidrBlock. + */ + com.google.protobuf.ByteString getServicesIpv4CidrBlockBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersion.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersion.java new file mode 100644 index 00000000..a0dc7b5f --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersion.java @@ -0,0 +1,1477 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Image Version information
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} + */ +public final class ImageVersion extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + ImageVersionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageVersion.newBuilder() to construct. + private ImageVersion(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageVersion() { + imageVersionId_ = ""; + supportedPythonVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ImageVersion(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageVersion( + 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(); + + imageVersionId_ = s; + break; + } + case 16: + { + isDefault_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + supportedPythonVersions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + supportedPythonVersions_.add(s); + break; + } + case 34: + { + com.google.type.Date.Builder subBuilder = null; + if (releaseDate_ != null) { + subBuilder = releaseDate_.toBuilder(); + } + releaseDate_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(releaseDate_); + releaseDate_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + creationDisabled_ = input.readBool(); + break; + } + case 48: + { + upgradeDisabled_ = 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_ & 0x00000001) != 0)) { + supportedPythonVersions_ = supportedPythonVersions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder.class); + } + + public static final int IMAGE_VERSION_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object imageVersionId_; + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The imageVersionId. + */ + @java.lang.Override + public java.lang.String getImageVersionId() { + java.lang.Object ref = imageVersionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The bytes for imageVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getImageVersionIdBytes() { + java.lang.Object ref = imageVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DEFAULT_FIELD_NUMBER = 2; + private boolean isDefault_; + /** + * + * + *
+   * Whether this is the default ImageVersion used by Composer during
+   * environment creation if no input ImageVersion is specified.
+   * 
+ * + * bool is_default = 2; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + + public static final int SUPPORTED_PYTHON_VERSIONS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList supportedPythonVersions_; + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return A list containing the supportedPythonVersions. + */ + public com.google.protobuf.ProtocolStringList getSupportedPythonVersionsList() { + return supportedPythonVersions_; + } + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return The count of supportedPythonVersions. + */ + public int getSupportedPythonVersionsCount() { + return supportedPythonVersions_.size(); + } + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the element to return. + * @return The supportedPythonVersions at the given index. + */ + public java.lang.String getSupportedPythonVersions(int index) { + return supportedPythonVersions_.get(index); + } + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedPythonVersions at the given index. + */ + public com.google.protobuf.ByteString getSupportedPythonVersionsBytes(int index) { + return supportedPythonVersions_.getByteString(index); + } + + public static final int RELEASE_DATE_FIELD_NUMBER = 4; + private com.google.type.Date releaseDate_; + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return Whether the releaseDate field is set. + */ + @java.lang.Override + public boolean hasReleaseDate() { + return releaseDate_ != null; + } + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return The releaseDate. + */ + @java.lang.Override + public com.google.type.Date getReleaseDate() { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getReleaseDateOrBuilder() { + return getReleaseDate(); + } + + public static final int CREATION_DISABLED_FIELD_NUMBER = 5; + private boolean creationDisabled_; + /** + * + * + *
+   * Whether it is impossible to create an environment with the image version.
+   * 
+ * + * bool creation_disabled = 5; + * + * @return The creationDisabled. + */ + @java.lang.Override + public boolean getCreationDisabled() { + return creationDisabled_; + } + + public static final int UPGRADE_DISABLED_FIELD_NUMBER = 6; + private boolean upgradeDisabled_; + /** + * + * + *
+   * Whether it is impossible to upgrade an environment running with the image
+   * version.
+   * 
+ * + * bool upgrade_disabled = 6; + * + * @return The upgradeDisabled. + */ + @java.lang.Override + public boolean getUpgradeDisabled() { + return upgradeDisabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getImageVersionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageVersionId_); + } + if (isDefault_ != false) { + output.writeBool(2, isDefault_); + } + for (int i = 0; i < supportedPythonVersions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, supportedPythonVersions_.getRaw(i)); + } + if (releaseDate_ != null) { + output.writeMessage(4, getReleaseDate()); + } + if (creationDisabled_ != false) { + output.writeBool(5, creationDisabled_); + } + if (upgradeDisabled_ != false) { + output.writeBool(6, upgradeDisabled_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageVersionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageVersionId_); + } + if (isDefault_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, isDefault_); + } + { + int dataSize = 0; + for (int i = 0; i < supportedPythonVersions_.size(); i++) { + dataSize += computeStringSizeNoTag(supportedPythonVersions_.getRaw(i)); + } + size += dataSize; + size += 1 * getSupportedPythonVersionsList().size(); + } + if (releaseDate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReleaseDate()); + } + if (creationDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, creationDisabled_); + } + if (upgradeDisabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, upgradeDisabled_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion other = + (com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) obj; + + if (!getImageVersionId().equals(other.getImageVersionId())) return false; + if (getIsDefault() != other.getIsDefault()) return false; + if (!getSupportedPythonVersionsList().equals(other.getSupportedPythonVersionsList())) + return false; + if (hasReleaseDate() != other.hasReleaseDate()) return false; + if (hasReleaseDate()) { + if (!getReleaseDate().equals(other.getReleaseDate())) return false; + } + if (getCreationDisabled() != other.getCreationDisabled()) return false; + if (getUpgradeDisabled() != other.getUpgradeDisabled()) return false; + if (!unknownFields.equals(other.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_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageVersionId().hashCode(); + hash = (37 * hash) + IS_DEFAULT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDefault()); + if (getSupportedPythonVersionsCount() > 0) { + hash = (37 * hash) + SUPPORTED_PYTHON_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getSupportedPythonVersionsList().hashCode(); + } + if (hasReleaseDate()) { + hash = (37 * hash) + RELEASE_DATE_FIELD_NUMBER; + hash = (53 * hash) + getReleaseDate().hashCode(); + } + hash = (37 * hash) + CREATION_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getCreationDisabled()); + hash = (37 * hash) + UPGRADE_DISABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpgradeDisabled()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Image Version information
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + imageVersionId_ = ""; + + isDefault_ = false; + + supportedPythonVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (releaseDateBuilder_ == null) { + releaseDate_ = null; + } else { + releaseDate_ = null; + releaseDateBuilder_ = null; + } + creationDisabled_ = false; + + upgradeDisabled_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion build() { + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion result = + new com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(this); + int from_bitField0_ = bitField0_; + result.imageVersionId_ = imageVersionId_; + result.isDefault_ = isDefault_; + if (((bitField0_ & 0x00000001) != 0)) { + supportedPythonVersions_ = supportedPythonVersions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.supportedPythonVersions_ = supportedPythonVersions_; + if (releaseDateBuilder_ == null) { + result.releaseDate_ = releaseDate_; + } else { + result.releaseDate_ = releaseDateBuilder_.build(); + } + result.creationDisabled_ = creationDisabled_; + result.upgradeDisabled_ = upgradeDisabled_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + .getDefaultInstance()) return this; + if (!other.getImageVersionId().isEmpty()) { + imageVersionId_ = other.imageVersionId_; + onChanged(); + } + if (other.getIsDefault() != false) { + setIsDefault(other.getIsDefault()); + } + if (!other.supportedPythonVersions_.isEmpty()) { + if (supportedPythonVersions_.isEmpty()) { + supportedPythonVersions_ = other.supportedPythonVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.addAll(other.supportedPythonVersions_); + } + onChanged(); + } + if (other.hasReleaseDate()) { + mergeReleaseDate(other.getReleaseDate()); + } + if (other.getCreationDisabled() != false) { + setCreationDisabled(other.getCreationDisabled()); + } + if (other.getUpgradeDisabled() != false) { + setUpgradeDisabled(other.getUpgradeDisabled()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object imageVersionId_ = ""; + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @return The imageVersionId. + */ + public java.lang.String getImageVersionId() { + java.lang.Object ref = imageVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @return The bytes for imageVersionId. + */ + public com.google.protobuf.ByteString getImageVersionIdBytes() { + java.lang.Object ref = imageVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @param value The imageVersionId to set. + * @return This builder for chaining. + */ + public Builder setImageVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageVersionId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageVersionId() { + + imageVersionId_ = getDefaultInstance().getImageVersionId(); + onChanged(); + return this; + } + /** + * + * + *
+     * The string identifier of the ImageVersion, in the form:
+     * "composer-x.y.z-airflow-a.b(.c)"
+     * 
+ * + * string image_version_id = 1; + * + * @param value The bytes for imageVersionId to set. + * @return This builder for chaining. + */ + public Builder setImageVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageVersionId_ = value; + onChanged(); + return this; + } + + private boolean isDefault_; + /** + * + * + *
+     * Whether this is the default ImageVersion used by Composer during
+     * environment creation if no input ImageVersion is specified.
+     * 
+ * + * bool is_default = 2; + * + * @return The isDefault. + */ + @java.lang.Override + public boolean getIsDefault() { + return isDefault_; + } + /** + * + * + *
+     * Whether this is the default ImageVersion used by Composer during
+     * environment creation if no input ImageVersion is specified.
+     * 
+ * + * bool is_default = 2; + * + * @param value The isDefault to set. + * @return This builder for chaining. + */ + public Builder setIsDefault(boolean value) { + + isDefault_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether this is the default ImageVersion used by Composer during
+     * environment creation if no input ImageVersion is specified.
+     * 
+ * + * bool is_default = 2; + * + * @return This builder for chaining. + */ + public Builder clearIsDefault() { + + isDefault_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList supportedPythonVersions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureSupportedPythonVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + supportedPythonVersions_ = + new com.google.protobuf.LazyStringArrayList(supportedPythonVersions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @return A list containing the supportedPythonVersions. + */ + public com.google.protobuf.ProtocolStringList getSupportedPythonVersionsList() { + return supportedPythonVersions_.getUnmodifiableView(); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @return The count of supportedPythonVersions. + */ + public int getSupportedPythonVersionsCount() { + return supportedPythonVersions_.size(); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the element to return. + * @return The supportedPythonVersions at the given index. + */ + public java.lang.String getSupportedPythonVersions(int index) { + return supportedPythonVersions_.get(index); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedPythonVersions at the given index. + */ + public com.google.protobuf.ByteString getSupportedPythonVersionsBytes(int index) { + return supportedPythonVersions_.getByteString(index); + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index to set the value at. + * @param value The supportedPythonVersions to set. + * @return This builder for chaining. + */ + public Builder setSupportedPythonVersions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param value The supportedPythonVersions to add. + * @return This builder for chaining. + */ + public Builder addSupportedPythonVersions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param values The supportedPythonVersions to add. + * @return This builder for chaining. + */ + public Builder addAllSupportedPythonVersions(java.lang.Iterable values) { + ensureSupportedPythonVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, supportedPythonVersions_); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @return This builder for chaining. + */ + public Builder clearSupportedPythonVersions() { + supportedPythonVersions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * supported python versions
+     * 
+ * + * repeated string supported_python_versions = 3; + * + * @param value The bytes of the supportedPythonVersions to add. + * @return This builder for chaining. + */ + public Builder addSupportedPythonVersionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSupportedPythonVersionsIsMutable(); + supportedPythonVersions_.add(value); + onChanged(); + return this; + } + + private com.google.type.Date releaseDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + releaseDateBuilder_; + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + * + * @return Whether the releaseDate field is set. + */ + public boolean hasReleaseDate() { + return releaseDateBuilder_ != null || releaseDate_ != null; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + * + * @return The releaseDate. + */ + public com.google.type.Date getReleaseDate() { + if (releaseDateBuilder_ == null) { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } else { + return releaseDateBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder setReleaseDate(com.google.type.Date value) { + if (releaseDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + releaseDate_ = value; + onChanged(); + } else { + releaseDateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder setReleaseDate(com.google.type.Date.Builder builderForValue) { + if (releaseDateBuilder_ == null) { + releaseDate_ = builderForValue.build(); + onChanged(); + } else { + releaseDateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder mergeReleaseDate(com.google.type.Date value) { + if (releaseDateBuilder_ == null) { + if (releaseDate_ != null) { + releaseDate_ = + com.google.type.Date.newBuilder(releaseDate_).mergeFrom(value).buildPartial(); + } else { + releaseDate_ = value; + } + onChanged(); + } else { + releaseDateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public Builder clearReleaseDate() { + if (releaseDateBuilder_ == null) { + releaseDate_ = null; + onChanged(); + } else { + releaseDate_ = null; + releaseDateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public com.google.type.Date.Builder getReleaseDateBuilder() { + + onChanged(); + return getReleaseDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + public com.google.type.DateOrBuilder getReleaseDateOrBuilder() { + if (releaseDateBuilder_ != null) { + return releaseDateBuilder_.getMessageOrBuilder(); + } else { + return releaseDate_ == null ? com.google.type.Date.getDefaultInstance() : releaseDate_; + } + } + /** + * + * + *
+     * The date of the version release.
+     * 
+ * + * .google.type.Date release_date = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getReleaseDateFieldBuilder() { + if (releaseDateBuilder_ == null) { + releaseDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>( + getReleaseDate(), getParentForChildren(), isClean()); + releaseDate_ = null; + } + return releaseDateBuilder_; + } + + private boolean creationDisabled_; + /** + * + * + *
+     * Whether it is impossible to create an environment with the image version.
+     * 
+ * + * bool creation_disabled = 5; + * + * @return The creationDisabled. + */ + @java.lang.Override + public boolean getCreationDisabled() { + return creationDisabled_; + } + /** + * + * + *
+     * Whether it is impossible to create an environment with the image version.
+     * 
+ * + * bool creation_disabled = 5; + * + * @param value The creationDisabled to set. + * @return This builder for chaining. + */ + public Builder setCreationDisabled(boolean value) { + + creationDisabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether it is impossible to create an environment with the image version.
+     * 
+ * + * bool creation_disabled = 5; + * + * @return This builder for chaining. + */ + public Builder clearCreationDisabled() { + + creationDisabled_ = false; + onChanged(); + return this; + } + + private boolean upgradeDisabled_; + /** + * + * + *
+     * Whether it is impossible to upgrade an environment running with the image
+     * version.
+     * 
+ * + * bool upgrade_disabled = 6; + * + * @return The upgradeDisabled. + */ + @java.lang.Override + public boolean getUpgradeDisabled() { + return upgradeDisabled_; + } + /** + * + * + *
+     * Whether it is impossible to upgrade an environment running with the image
+     * version.
+     * 
+ * + * bool upgrade_disabled = 6; + * + * @param value The upgradeDisabled to set. + * @return This builder for chaining. + */ + public Builder setUpgradeDisabled(boolean value) { + + upgradeDisabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether it is impossible to upgrade an environment running with the image
+     * version.
+     * 
+ * + * bool upgrade_disabled = 6; + * + * @return This builder for chaining. + */ + public Builder clearUpgradeDisabled() { + + upgradeDisabled_ = 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.orchestration.airflow.service.v1beta1.ImageVersion) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageVersion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageVersion(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionOrBuilder.java new file mode 100644 index 00000000..2fb1b0c6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionOrBuilder.java @@ -0,0 +1,179 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface ImageVersionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The imageVersionId. + */ + java.lang.String getImageVersionId(); + /** + * + * + *
+   * The string identifier of the ImageVersion, in the form:
+   * "composer-x.y.z-airflow-a.b(.c)"
+   * 
+ * + * string image_version_id = 1; + * + * @return The bytes for imageVersionId. + */ + com.google.protobuf.ByteString getImageVersionIdBytes(); + + /** + * + * + *
+   * Whether this is the default ImageVersion used by Composer during
+   * environment creation if no input ImageVersion is specified.
+   * 
+ * + * bool is_default = 2; + * + * @return The isDefault. + */ + boolean getIsDefault(); + + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return A list containing the supportedPythonVersions. + */ + java.util.List getSupportedPythonVersionsList(); + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @return The count of supportedPythonVersions. + */ + int getSupportedPythonVersionsCount(); + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the element to return. + * @return The supportedPythonVersions at the given index. + */ + java.lang.String getSupportedPythonVersions(int index); + /** + * + * + *
+   * supported python versions
+   * 
+ * + * repeated string supported_python_versions = 3; + * + * @param index The index of the value to return. + * @return The bytes of the supportedPythonVersions at the given index. + */ + com.google.protobuf.ByteString getSupportedPythonVersionsBytes(int index); + + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return Whether the releaseDate field is set. + */ + boolean hasReleaseDate(); + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + * + * @return The releaseDate. + */ + com.google.type.Date getReleaseDate(); + /** + * + * + *
+   * The date of the version release.
+   * 
+ * + * .google.type.Date release_date = 4; + */ + com.google.type.DateOrBuilder getReleaseDateOrBuilder(); + + /** + * + * + *
+   * Whether it is impossible to create an environment with the image version.
+   * 
+ * + * bool creation_disabled = 5; + * + * @return The creationDisabled. + */ + boolean getCreationDisabled(); + + /** + * + * + *
+   * Whether it is impossible to upgrade an environment running with the image
+   * version.
+   * 
+ * + * bool upgrade_disabled = 6; + * + * @return The upgradeDisabled. + */ + boolean getUpgradeDisabled(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsOuterClass.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsOuterClass.java new file mode 100644 index 00000000..f36eafe6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ImageVersionsOuterClass.java @@ -0,0 +1,133 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public final class ImageVersionsOuterClass { + private ImageVersionsOuterClass() {} + + 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_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nGgoogle/cloud/orchestration/airflow/ser" + + "vice/v1beta1/image_versions.proto\0222googl" + + "e.cloud.orchestration.airflow.service.v1" + + "beta1\032\034google/api/annotations.proto\032\027goo" + + "gle/api/client.proto\032\026google/type/date.p" + + "roto\"p\n\030ListImageVersionsRequest\022\016\n\006pare" + + "nt\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_toke" + + "n\030\003 \001(\t\022\035\n\025include_past_releases\030\004 \001(\010\"\216" + + "\001\n\031ListImageVersionsResponse\022X\n\016image_ve" + + "rsions\030\001 \003(\0132@.google.cloud.orchestratio" + + "n.airflow.service.v1beta1.ImageVersion\022\027" + + "\n\017next_page_token\030\002 \001(\t\"\275\001\n\014ImageVersion" + + "\022\030\n\020image_version_id\030\001 \001(\t\022\022\n\nis_default" + + "\030\002 \001(\010\022!\n\031supported_python_versions\030\003 \003(" + + "\t\022\'\n\014release_date\030\004 \001(\0132\021.google.type.Da" + + "te\022\031\n\021creation_disabled\030\005 \001(\010\022\030\n\020upgrade" + + "_disabled\030\006 \001(\0102\330\002\n\rImageVersions\022\371\001\n\021Li" + + "stImageVersions\022L.google.cloud.orchestra" + + "tion.airflow.service.v1beta1.ListImageVe" + + "rsionsRequest\032M.google.cloud.orchestrati" + + "on.airflow.service.v1beta1.ListImageVers" + + "ionsResponse\"G\202\323\344\223\0028\0226/v1beta1/{parent=p" + + "rojects/*/locations/*}/imageVersions\332A\006p" + + "arent\032K\312A\027composer.googleapis.com\322A.http" + + "s://www.googleapis.com/auth/cloud-platfo" + + "rmB\225\001\n6com.google.cloud.orchestration.ai" + + "rflow.service.v1beta1P\001ZYgoogle.golang.o" + + "rg/genproto/googleapis/cloud/orchestrati" + + "on/airflow/service/v1beta1;serviceb\006prot" + + "o3" + }; + 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.type.DateProto.getDescriptor(), + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "IncludePastReleases", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_descriptor, + new java.lang.String[] { + "ImageVersions", "NextPageToken", + }); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_ImageVersion_descriptor, + new java.lang.String[] { + "ImageVersionId", + "IsDefault", + "SupportedPythonVersions", + "ReleaseDate", + "CreationDisabled", + "UpgradeDisabled", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsRequest.java new file mode 100644 index 00000000..ad93bd23 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsRequest.java @@ -0,0 +1,941 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * List environments in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} + */ +public final class ListEnvironmentsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + ListEnvironmentsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsRequest.newBuilder() to construct. + private ListEnvironmentsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsRequest( + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of environments to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * 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.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) 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.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List environments in a project and location.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(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.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + .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.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * List environments in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of environments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of environments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of environments to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * 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.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsRequestOrBuilder.java new file mode 100644 index 00000000..5147205e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface ListEnvironmentsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * List environments in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of environments to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsResponse.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsResponse.java new file mode 100644 index 00000000..6ee68ed8 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsResponse.java @@ -0,0 +1,1238 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The environments in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} + */ +public final class ListEnvironmentsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + ListEnvironmentsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEnvironmentsResponse.newBuilder() to construct. + private ListEnvironmentsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEnvironmentsResponse() { + environments_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEnvironmentsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEnvironmentsResponse( + 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)) { + environments_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment>(); + mutable_bitField0_ |= 0x00000001; + } + environments_.add( + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.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)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.Builder + .class); + } + + public static final int ENVIRONMENTS_FIELD_NUMBER = 1; + private java.util.List + environments_; + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + @java.lang.Override + public java.util.List + getEnvironmentsList() { + return environments_; + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + getEnvironmentsOrBuilderList() { + return environments_; + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + @java.lang.Override + public int getEnvironmentsCount() { + return environments_.size(); + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironments( + int index) { + return environments_.get(index); + } + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentsOrBuilder(int index) { + return environments_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < environments_.size(); i++) { + output.writeMessage(1, environments_.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 < environments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, environments_.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.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse other = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) obj; + + if (!getEnvironmentsList().equals(other.getEnvironmentsList())) 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 (getEnvironmentsCount() > 0) { + hash = (37 * hash) + ENVIRONMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentsList().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.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 environments in a project and location.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEnvironmentsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + environmentsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListEnvironmentsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse build() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse result = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(this); + int from_bitField0_ = bitField0_; + if (environmentsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + environments_ = java.util.Collections.unmodifiableList(environments_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.environments_ = environments_; + } else { + result.environments_ = environmentsBuilder_.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.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + .getDefaultInstance()) return this; + if (environmentsBuilder_ == null) { + if (!other.environments_.isEmpty()) { + if (environments_.isEmpty()) { + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEnvironmentsIsMutable(); + environments_.addAll(other.environments_); + } + onChanged(); + } + } else { + if (!other.environments_.isEmpty()) { + if (environmentsBuilder_.isEmpty()) { + environmentsBuilder_.dispose(); + environmentsBuilder_ = null; + environments_ = other.environments_; + bitField0_ = (bitField0_ & ~0x00000001); + environmentsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEnvironmentsFieldBuilder() + : null; + } else { + environmentsBuilder_.addAllMessages(other.environments_); + } + } + } + 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.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + environments_ = java.util.Collections.emptyList(); + + private void ensureEnvironmentsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + environments_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment>(environments_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + environmentsBuilder_; + + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public java.util.List + getEnvironmentsList() { + if (environmentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(environments_); + } else { + return environmentsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public int getEnvironmentsCount() { + if (environmentsBuilder_ == null) { + return environments_.size(); + } else { + return environmentsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironments( + int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder setEnvironments( + int index, com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.set(index, value); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder setEnvironments( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.set(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder addEnvironments( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(value); + onChanged(); + } else { + environmentsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder addEnvironments( + int index, com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEnvironmentsIsMutable(); + environments_.add(index, value); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder addEnvironments( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder addEnvironments( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + builderForValue) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.add(index, builderForValue.build()); + onChanged(); + } else { + environmentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder addAllEnvironments( + java.lang.Iterable< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.Environment> + values) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, environments_); + onChanged(); + } else { + environmentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder clearEnvironments() { + if (environmentsBuilder_ == null) { + environments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + environmentsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public Builder removeEnvironments(int index) { + if (environmentsBuilder_ == null) { + ensureEnvironmentsIsMutable(); + environments_.remove(index); + onChanged(); + } else { + environmentsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + getEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentsOrBuilder(int index) { + if (environmentsBuilder_ == null) { + return environments_.get(index); + } else { + return environmentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + getEnvironmentsOrBuilderList() { + if (environmentsBuilder_ != null) { + return environmentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(environments_); + } + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + addEnvironmentsBuilder() { + return getEnvironmentsFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + addEnvironmentsBuilder(int index) { + return getEnvironmentsFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of environments returned by a ListEnvironmentsRequest.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder> + getEnvironmentsBuilderList() { + return getEnvironmentsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + getEnvironmentsFieldBuilder() { + if (environmentsBuilder_ == null) { + environmentsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder>( + environments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + environments_ = null; + } + return environmentsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .ListEnvironmentsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEnvironmentsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEnvironmentsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsResponseOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsResponseOrBuilder.java new file mode 100644 index 00000000..19177e2e --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListEnvironmentsResponseOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface ListEnvironmentsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + java.util.List + getEnvironmentsList(); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironments(int index); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + int getEnvironmentsCount(); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + getEnvironmentsOrBuilderList(); + /** + * + * + *
+   * The list of environments returned by a ListEnvironmentsRequest.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.Environment environments = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentsOrBuilder(int index); + + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsRequest.java new file mode 100644 index 00000000..e646afee --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsRequest.java @@ -0,0 +1,1032 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * List ImageVersions in a project and location.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} + */ +public final class ListImageVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + ListImageVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImageVersionsRequest.newBuilder() to construct. + private ListImageVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImageVersionsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImageVersionsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListImageVersionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + includePastReleases_ = 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.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.Builder + .class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * The maximum number of image_versions to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCLUDE_PAST_RELEASES_FIELD_NUMBER = 4; + private boolean includePastReleases_; + /** + * + * + *
+   * Whether or not image versions from old releases should be included.
+   * 
+ * + * bool include_past_releases = 4; + * + * @return The includePastReleases. + */ + @java.lang.Override + public boolean getIncludePastReleases() { + return includePastReleases_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (includePastReleases_ != false) { + output.writeBool(4, includePastReleases_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (includePastReleases_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includePastReleases_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getIncludePastReleases() != other.getIncludePastReleases()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + INCLUDE_PAST_RELEASES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludePastReleases()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * List ImageVersions in a project and location.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + includePastReleases_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.includePastReleases_ = includePastReleases_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getIncludePastReleases() != false) { + setIncludePastReleases(other.getIncludePastReleases()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * List ImageVersions in the given project and location, in the form:
+     * "projects/{projectId}/locations/{locationId}"
+     * 
+ * + * string parent = 1; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The maximum number of image_versions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The maximum number of image_versions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The maximum number of image_versions to return.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The next_page_token value returned from a previous List request, if any.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private boolean includePastReleases_; + /** + * + * + *
+     * Whether or not image versions from old releases should be included.
+     * 
+ * + * bool include_past_releases = 4; + * + * @return The includePastReleases. + */ + @java.lang.Override + public boolean getIncludePastReleases() { + return includePastReleases_; + } + /** + * + * + *
+     * Whether or not image versions from old releases should be included.
+     * 
+ * + * bool include_past_releases = 4; + * + * @param value The includePastReleases to set. + * @return This builder for chaining. + */ + public Builder setIncludePastReleases(boolean value) { + + includePastReleases_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether or not image versions from old releases should be included.
+     * 
+ * + * bool include_past_releases = 4; + * + * @return This builder for chaining. + */ + public Builder clearIncludePastReleases() { + + includePastReleases_ = 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.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImageVersionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListImageVersionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsRequestOrBuilder.java new file mode 100644 index 00000000..6f3a45a6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsRequestOrBuilder.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface ListImageVersionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * List ImageVersions in the given project and location, in the form:
+   * "projects/{projectId}/locations/{locationId}"
+   * 
+ * + * string parent = 1; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of image_versions to return.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The next_page_token value returned from a previous List request, if any.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Whether or not image versions from old releases should be included.
+   * 
+ * + * bool include_past_releases = 4; + * + * @return The includePastReleases. + */ + boolean getIncludePastReleases(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsResponse.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsResponse.java new file mode 100644 index 00000000..7b485db2 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsResponse.java @@ -0,0 +1,1246 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The ImageVersions in a project and location.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} + */ +public final class ListImageVersionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + ListImageVersionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListImageVersionsResponse.newBuilder() to construct. + private ListImageVersionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListImageVersionsResponse() { + imageVersions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListImageVersionsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListImageVersionsResponse( + 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)) { + imageVersions_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion>(); + mutable_bitField0_ |= 0x00000001; + } + imageVersions_.add( + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.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)) { + imageVersions_ = java.util.Collections.unmodifiableList(imageVersions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.Builder + .class); + } + + public static final int IMAGE_VERSIONS_FIELD_NUMBER = 1; + private java.util.List + imageVersions_; + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public java.util.List + getImageVersionsList() { + return imageVersions_; + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder> + getImageVersionsOrBuilderList() { + return imageVersions_; + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public int getImageVersionsCount() { + return imageVersions_.size(); + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion getImageVersions( + int index) { + return imageVersions_.get(index); + } + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder + getImageVersionsOrBuilder(int index) { + return imageVersions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < imageVersions_.size(); i++) { + output.writeMessage(1, imageVersions_.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 < imageVersions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, imageVersions_.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.orchestration.airflow.service.v1beta1.ListImageVersionsResponse)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse other = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) obj; + + if (!getImageVersionsList().equals(other.getImageVersionsList())) 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 (getImageVersionsCount() > 0) { + hash = (37 * hash) + IMAGE_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + getImageVersionsList().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.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ImageVersions in a project and location.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getImageVersionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (imageVersionsBuilder_ == null) { + imageVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + imageVersionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_ListImageVersionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse result = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse( + this); + int from_bitField0_ = bitField0_; + if (imageVersionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + imageVersions_ = java.util.Collections.unmodifiableList(imageVersions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.imageVersions_ = imageVersions_; + } else { + result.imageVersions_ = imageVersionsBuilder_.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.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + .getDefaultInstance()) return this; + if (imageVersionsBuilder_ == null) { + if (!other.imageVersions_.isEmpty()) { + if (imageVersions_.isEmpty()) { + imageVersions_ = other.imageVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureImageVersionsIsMutable(); + imageVersions_.addAll(other.imageVersions_); + } + onChanged(); + } + } else { + if (!other.imageVersions_.isEmpty()) { + if (imageVersionsBuilder_.isEmpty()) { + imageVersionsBuilder_.dispose(); + imageVersionsBuilder_ = null; + imageVersions_ = other.imageVersions_; + bitField0_ = (bitField0_ & ~0x00000001); + imageVersionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getImageVersionsFieldBuilder() + : null; + } else { + imageVersionsBuilder_.addAllMessages(other.imageVersions_); + } + } + } + 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.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + imageVersions_ = java.util.Collections.emptyList(); + + private void ensureImageVersionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + imageVersions_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion>( + imageVersions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder> + imageVersionsBuilder_; + + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public java.util.List + getImageVersionsList() { + if (imageVersionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(imageVersions_); + } else { + return imageVersionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public int getImageVersionsCount() { + if (imageVersionsBuilder_ == null) { + return imageVersions_.size(); + } else { + return imageVersionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion getImageVersions( + int index) { + if (imageVersionsBuilder_ == null) { + return imageVersions_.get(index); + } else { + return imageVersionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder setImageVersions( + int index, com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion value) { + if (imageVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageVersionsIsMutable(); + imageVersions_.set(index, value); + onChanged(); + } else { + imageVersionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder setImageVersions( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder + builderForValue) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.set(index, builderForValue.build()); + onChanged(); + } else { + imageVersionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion value) { + if (imageVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageVersionsIsMutable(); + imageVersions_.add(value); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + int index, com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion value) { + if (imageVersionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImageVersionsIsMutable(); + imageVersions_.add(index, value); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder + builderForValue) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.add(builderForValue.build()); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder addImageVersions( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder + builderForValue) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.add(index, builderForValue.build()); + onChanged(); + } else { + imageVersionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder addAllImageVersions( + java.lang.Iterable< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion> + values) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, imageVersions_); + onChanged(); + } else { + imageVersionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder clearImageVersions() { + if (imageVersionsBuilder_ == null) { + imageVersions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + imageVersionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public Builder removeImageVersions(int index) { + if (imageVersionsBuilder_ == null) { + ensureImageVersionsIsMutable(); + imageVersions_.remove(index); + onChanged(); + } else { + imageVersionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder + getImageVersionsBuilder(int index) { + return getImageVersionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder + getImageVersionsOrBuilder(int index) { + if (imageVersionsBuilder_ == null) { + return imageVersions_.get(index); + } else { + return imageVersionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder> + getImageVersionsOrBuilderList() { + if (imageVersionsBuilder_ != null) { + return imageVersionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(imageVersions_); + } + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder + addImageVersionsBuilder() { + return getImageVersionsFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder + addImageVersionsBuilder(int index) { + return getImageVersionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + .getDefaultInstance()); + } + /** + * + * + *
+     * The list of supported ImageVersions in a location.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder> + getImageVersionsBuilderList() { + return getImageVersionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder> + getImageVersionsFieldBuilder() { + if (imageVersionsBuilder_ == null) { + imageVersionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder>( + imageVersions_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + imageVersions_ = null; + } + return imageVersionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The page token used to query for the next page if one exists.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .ListImageVersionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListImageVersionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListImageVersionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsResponseOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsResponseOrBuilder.java new file mode 100644 index 00000000..91290ad6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/ListImageVersionsResponseOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface ListImageVersionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + java.util.List + getImageVersionsList(); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion getImageVersions(int index); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + int getImageVersionsCount(); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + java.util.List< + ? extends com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder> + getImageVersionsOrBuilderList(); + /** + * + * + *
+   * The list of supported ImageVersions in a location.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.ImageVersion image_versions = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.ImageVersionOrBuilder + getImageVersionsOrBuilder(int index); + + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The page token used to query for the next page if one exists.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/MaintenanceWindow.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/MaintenanceWindow.java new file mode 100644 index 00000000..d69978e6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/MaintenanceWindow.java @@ -0,0 +1,1271 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The configuration settings for Cloud Composer maintenance window.
+ * The following example:
+ *    {
+ *      "startTime":"2019-08-01T01:00:00Z"
+ *      "endTime":"2019-08-01T07:00:00Z"
+ *      "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE"
+ *    }
+ * would define a maintenance window between 01 and 07 hours UTC during
+ * each Tuesday and Wednesday.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} + */ +public final class MaintenanceWindow extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + MaintenanceWindowOrBuilder { + private static final long serialVersionUID = 0L; + // Use MaintenanceWindow.newBuilder() to construct. + private MaintenanceWindow(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MaintenanceWindow() { + recurrence_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MaintenanceWindow(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MaintenanceWindow( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (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 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + recurrence_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.class, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Required. Start time of the first recurrence of the maintenance window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Required. Start time of the first recurrence of the maintenance window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Required. Start time of the first recurrence of the maintenance window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Required. Maintenance window end time. It is used only to calculate the duration of
+   * the maintenance window.
+   * The value for end_time must be in the future, relative to `start_time`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Required. Maintenance window end time. It is used only to calculate the duration of
+   * the maintenance window.
+   * The value for end_time must be in the future, relative to `start_time`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Required. Maintenance window end time. It is used only to calculate the duration of
+   * the maintenance window.
+   * The value for end_time must be in the future, relative to `start_time`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int RECURRENCE_FIELD_NUMBER = 3; + private volatile java.lang.Object recurrence_; + /** + * + * + *
+   * Required. Maintenance window recurrence. Format is a subset of
+   * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+   * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+   * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+   * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The recurrence. + */ + @java.lang.Override + public java.lang.String getRecurrence() { + java.lang.Object ref = recurrence_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recurrence_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Maintenance window recurrence. Format is a subset of
+   * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+   * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+   * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+   * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for recurrence. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRecurrenceBytes() { + java.lang.Object ref = recurrence_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recurrence_ = 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 (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (!getRecurrenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, recurrence_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (!getRecurrenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, recurrence_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow other = + (com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) obj; + + 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 (!getRecurrence().equals(other.getRecurrence())) return false; + if (!unknownFields.equals(other.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 (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) + RECURRENCE_FIELD_NUMBER; + hash = (53 * hash) + getRecurrence().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration settings for Cloud Composer maintenance window.
+   * The following example:
+   *    {
+   *      "startTime":"2019-08-01T01:00:00Z"
+   *      "endTime":"2019-08-01T07:00:00Z"
+   *      "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE"
+   *    }
+   * would define a maintenance window between 01 and 07 hours UTC during
+   * each Tuesday and Wednesday.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.class, + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + recurrence_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_MaintenanceWindow_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow build() { + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow result = + new com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.recurrence_ = recurrence_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + .getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (!other.getRecurrence().isEmpty()) { + recurrence_ = other.recurrence_; + 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.orchestration.airflow.service.v1beta1.MaintenanceWindow parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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_; + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Required. Start time of the first recurrence of the maintenance window.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Required. Maintenance window end time. It is used only to calculate the duration of
+     * the maintenance window.
+     * The value for end_time must be in the future, relative to `start_time`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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 recurrence_ = ""; + /** + * + * + *
+     * Required. Maintenance window recurrence. Format is a subset of
+     * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+     * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+     * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+     * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The recurrence. + */ + public java.lang.String getRecurrence() { + java.lang.Object ref = recurrence_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + recurrence_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Maintenance window recurrence. Format is a subset of
+     * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+     * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+     * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+     * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for recurrence. + */ + public com.google.protobuf.ByteString getRecurrenceBytes() { + java.lang.Object ref = recurrence_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + recurrence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Maintenance window recurrence. Format is a subset of
+     * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+     * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+     * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+     * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The recurrence to set. + * @return This builder for chaining. + */ + public Builder setRecurrence(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + recurrence_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Maintenance window recurrence. Format is a subset of
+     * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+     * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+     * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+     * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRecurrence() { + + recurrence_ = getDefaultInstance().getRecurrence(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Maintenance window recurrence. Format is a subset of
+     * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+     * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+     * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+     * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for recurrence to set. + * @return This builder for chaining. + */ + public Builder setRecurrenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + recurrence_ = 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.orchestration.airflow.service.v1beta1.MaintenanceWindow) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MaintenanceWindow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MaintenanceWindow(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/MaintenanceWindowOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/MaintenanceWindowOrBuilder.java new file mode 100644 index 00000000..564e85ce --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/MaintenanceWindowOrBuilder.java @@ -0,0 +1,135 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface MaintenanceWindowOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Start time of the first recurrence of the maintenance window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Required. Start time of the first recurrence of the maintenance window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Required. Start time of the first recurrence of the maintenance window.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Required. Maintenance window end time. It is used only to calculate the duration of
+   * the maintenance window.
+   * The value for end_time must be in the future, relative to `start_time`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Required. Maintenance window end time. It is used only to calculate the duration of
+   * the maintenance window.
+   * The value for end_time must be in the future, relative to `start_time`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Required. Maintenance window end time. It is used only to calculate the duration of
+   * the maintenance window.
+   * The value for end_time must be in the future, relative to `start_time`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Required. Maintenance window recurrence. Format is a subset of
+   * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+   * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+   * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+   * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The recurrence. + */ + java.lang.String getRecurrence(); + /** + * + * + *
+   * Required. Maintenance window recurrence. Format is a subset of
+   * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed
+   * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...`
+   * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`.
+   * 
+ * + * string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for recurrence. + */ + com.google.protobuf.ByteString getRecurrenceBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/NodeConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/NodeConfig.java new file mode 100644 index 00000000..d0c7311a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/NodeConfig.java @@ -0,0 +1,2853 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The configuration information for the Kubernetes Engine nodes running
+ * the Apache Airflow software.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} + */ +public final class NodeConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + NodeConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NodeConfig.newBuilder() to construct. + private NodeConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NodeConfig() { + location_ = ""; + machineType_ = ""; + network_ = ""; + subnetwork_ = ""; + oauthScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + serviceAccount_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NodeConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NodeConfig( + 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(); + + location_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + machineType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + network_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + subnetwork_ = s; + break; + } + case 40: + { + diskSizeGb_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + oauthScopes_.add(s); + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceAccount_ = s; + break; + } + case 66: + { + 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 74: + { + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder + subBuilder = null; + if (ipAllocationPolicy_ != null) { + subBuilder = ipAllocationPolicy_.toBuilder(); + } + ipAllocationPolicy_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(ipAllocationPolicy_); + ipAllocationPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 80: + { + maxPodsPerNode_ = 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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = oauthScopes_.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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder.class); + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private volatile java.lang.Object location_; + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NETWORK_FIELD_NUMBER = 3; + private volatile java.lang.Object network_; + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the default network in the environment's project is used.
+   * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the default network in the environment's project is used.
+   * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBNETWORK_FIELD_NUMBER = 4; + private volatile java.lang.Object subnetwork_; + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetwork. + */ + @java.lang.Override + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetwork. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISK_SIZE_GB_FIELD_NUMBER = 5; + private int diskSizeGb_; + /** + * + * + *
+   * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+   * If unspecified, defaults to 100GB. Cannot be updated.
+   * 
+ * + * int32 disk_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public int getDiskSizeGb() { + return diskSizeGb_; + } + + public static final int OAUTH_SCOPES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList oauthScopes_; + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the oauthScopes. + */ + public com.google.protobuf.ProtocolStringList getOauthScopesList() { + return oauthScopes_; + } + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of oauthScopes. + */ + public int getOauthScopesCount() { + return oauthScopes_.size(); + } + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The oauthScopes at the given index. + */ + public java.lang.String getOauthScopes(int index) { + return oauthScopes_.get(index); + } + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the oauthScopes at the given index. + */ + public com.google.protobuf.ByteString getOauthScopesBytes(int index) { + return oauthScopes_.getByteString(index); + } + + public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 7; + private volatile java.lang.Object serviceAccount_; + /** + * + * + *
+   * Optional. The Google Cloud Platform Service Account to be used by the workloads. If a
+   * service account is not specified, the "default" Compute Engine service
+   * account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7 [(.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 Google Cloud Platform Service Account to be used by the workloads. If a
+   * service account is not specified, the "default" Compute Engine service
+   * account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7 [(.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 TAGS_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList tags_; + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_; + } + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 IP_ALLOCATION_POLICY_FIELD_NUMBER = 9; + private com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + ipAllocationPolicy_; + /** + * + * + *
+   * Optional. The IPAllocationPolicy fields for the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipAllocationPolicy field is set. + */ + @java.lang.Override + public boolean hasIpAllocationPolicy() { + return ipAllocationPolicy_ != null; + } + /** + * + * + *
+   * Optional. The IPAllocationPolicy fields for the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipAllocationPolicy. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + getIpAllocationPolicy() { + return ipAllocationPolicy_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + .getDefaultInstance() + : ipAllocationPolicy_; + } + /** + * + * + *
+   * Optional. The IPAllocationPolicy fields for the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder + getIpAllocationPolicyOrBuilder() { + return getIpAllocationPolicy(); + } + + public static final int MAX_PODS_PER_NODE_FIELD_NUMBER = 10; + private int maxPodsPerNode_; + /** + * + * + *
+   * Optional. The maximum number of pods per node in the Cloud Composer GKE cluster.
+   * The value must be between 8 and 110 and it can be set only if
+   * the environment is VPC-native.
+   * The default value is 32. Values of this field will be propagated both to
+   * the `default-pool` node pool of the newly created GKE cluster, and to the
+   * default "Maximum Pods per Node" value which is used for newly created
+   * node pools if their value is not explicitly set during node pool creation.
+   * For more information, see [Optimizing IP address allocation]
+   * (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr).
+   * Cannot be updated.
+   * 
+ * + * int32 max_pods_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxPodsPerNode. + */ + @java.lang.Override + public int getMaxPodsPerNode() { + return maxPodsPerNode_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getLocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, machineType_); + } + if (!getNetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, network_); + } + if (!getSubnetworkBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subnetwork_); + } + if (diskSizeGb_ != 0) { + output.writeInt32(5, diskSizeGb_); + } + for (int i = 0; i < oauthScopes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, oauthScopes_.getRaw(i)); + } + if (!getServiceAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceAccount_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, tags_.getRaw(i)); + } + if (ipAllocationPolicy_ != null) { + output.writeMessage(9, getIpAllocationPolicy()); + } + if (maxPodsPerNode_ != 0) { + output.writeInt32(10, maxPodsPerNode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getLocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, machineType_); + } + if (!getNetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, network_); + } + if (!getSubnetworkBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subnetwork_); + } + if (diskSizeGb_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, diskSizeGb_); + } + { + int dataSize = 0; + for (int i = 0; i < oauthScopes_.size(); i++) { + dataSize += computeStringSizeNoTag(oauthScopes_.getRaw(i)); + } + size += dataSize; + size += 1 * getOauthScopesList().size(); + } + if (!getServiceAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceAccount_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (ipAllocationPolicy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getIpAllocationPolicy()); + } + if (maxPodsPerNode_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(10, maxPodsPerNode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (!getMachineType().equals(other.getMachineType())) return false; + if (!getNetwork().equals(other.getNetwork())) return false; + if (!getSubnetwork().equals(other.getSubnetwork())) return false; + if (getDiskSizeGb() != other.getDiskSizeGb()) return false; + if (!getOauthScopesList().equals(other.getOauthScopesList())) return false; + if (!getServiceAccount().equals(other.getServiceAccount())) return false; + if (!getTagsList().equals(other.getTagsList())) return false; + if (hasIpAllocationPolicy() != other.hasIpAllocationPolicy()) return false; + if (hasIpAllocationPolicy()) { + if (!getIpAllocationPolicy().equals(other.getIpAllocationPolicy())) return false; + } + if (getMaxPodsPerNode() != other.getMaxPodsPerNode()) return false; + if (!unknownFields.equals(other.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) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; + hash = (53 * hash) + getSubnetwork().hashCode(); + hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER; + hash = (53 * hash) + getDiskSizeGb(); + if (getOauthScopesCount() > 0) { + hash = (37 * hash) + OAUTH_SCOPES_FIELD_NUMBER; + hash = (53 * hash) + getOauthScopesList().hashCode(); + } + hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccount().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (hasIpAllocationPolicy()) { + hash = (37 * hash) + IP_ALLOCATION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getIpAllocationPolicy().hashCode(); + } + hash = (37 * hash) + MAX_PODS_PER_NODE_FIELD_NUMBER; + hash = (53 * hash) + getMaxPodsPerNode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration information for the Kubernetes Engine nodes running
+   * the Apache Airflow software.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + location_ = ""; + + machineType_ = ""; + + network_ = ""; + + subnetwork_ = ""; + + diskSizeGb_ = 0; + + oauthScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccount_ = ""; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicy_ = null; + } else { + ipAllocationPolicy_ = null; + ipAllocationPolicyBuilder_ = null; + } + maxPodsPerNode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_NodeConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(this); + int from_bitField0_ = bitField0_; + result.location_ = location_; + result.machineType_ = machineType_; + result.network_ = network_; + result.subnetwork_ = subnetwork_; + result.diskSizeGb_ = diskSizeGb_; + if (((bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = oauthScopes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.oauthScopes_ = oauthScopes_; + result.serviceAccount_ = serviceAccount_; + if (((bitField0_ & 0x00000002) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.tags_ = tags_; + if (ipAllocationPolicyBuilder_ == null) { + result.ipAllocationPolicy_ = ipAllocationPolicy_; + } else { + result.ipAllocationPolicy_ = ipAllocationPolicyBuilder_.build(); + } + result.maxPodsPerNode_ = maxPodsPerNode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) { + return mergeFrom((com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.getDefaultInstance()) + return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + onChanged(); + } + if (!other.getNetwork().isEmpty()) { + network_ = other.network_; + onChanged(); + } + if (!other.getSubnetwork().isEmpty()) { + subnetwork_ = other.subnetwork_; + onChanged(); + } + if (other.getDiskSizeGb() != 0) { + setDiskSizeGb(other.getDiskSizeGb()); + } + if (!other.oauthScopes_.isEmpty()) { + if (oauthScopes_.isEmpty()) { + oauthScopes_ = other.oauthScopes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOauthScopesIsMutable(); + oauthScopes_.addAll(other.oauthScopes_); + } + onChanged(); + } + if (!other.getServiceAccount().isEmpty()) { + serviceAccount_ = other.serviceAccount_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (other.hasIpAllocationPolicy()) { + mergeIpAllocationPolicy(other.getIpAllocationPolicy()); + } + if (other.getMaxPodsPerNode() != 0) { + setMaxPodsPerNode(other.getMaxPodsPerNode()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+     * to deploy the VMs used to run the Apache Airflow software, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}".
+     * This `location` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.machineType` are specified,
+     * `nodeConfig.machineType` must belong to this `location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine
+     * [machine type](/compute/docs/machine-types) used for cluster instances,
+     * specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+     * The `machineType` must belong to the enclosing environment's project and
+     * location. If both this field and `nodeConfig.location` are specified,
+     * this `machineType` must belong to the `nodeConfig.location`; if both are
+     * unspecified, the service will pick a zone in the Compute Engine region
+     * corresponding to the Cloud Composer location, and propagate that choice to
+     * both fields. If exactly one of this field and `nodeConfig.location` is
+     * specified, the location information from the specified field will be
+     * propagated to the unspecified field.
+     * The `machineTypeId` must not be a [shared-core machine
+     * type](/compute/docs/machine-types#sharedcore).
+     * If this field is unspecified, the `machineTypeId` defaults
+     * to "n1-standard-1".
+     * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + private java.lang.Object network_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the default network in the environment's project is used.
+     * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the default network in the environment's project is used.
+     * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the default network in the environment's project is used.
+     * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + network_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the default network in the environment's project is used.
+     * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + + network_ = getDefaultInstance().getNetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine network to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/global/networks/{networkId}".
+     * If unspecified, the default network in the environment's project is used.
+     * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+     * is provided, `nodeConfig.subnetwork` must also be provided. For
+     * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+     * `nodeConfig.subnetwork`.
+     * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + network_ = value; + onChanged(); + return this; + } + + private java.lang.Object subnetwork_ = ""; + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetwork. + */ + public java.lang.String getSubnetwork() { + java.lang.Object ref = subnetwork_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subnetwork_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetwork. + */ + public com.google.protobuf.ByteString getSubnetworkBytes() { + java.lang.Object ref = subnetwork_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subnetwork_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subnetwork_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSubnetwork() { + + subnetwork_ = getDefaultInstance().getSubnetwork(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Compute Engine subnetwork to be used for machine
+     * communications, specified as a
+     * [relative resource
+     * name](/apis/design/resource_names#relative_resource_name). For example:
+     * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+     * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+     * and the subnetwork must belong to the enclosing environment's project and
+     * location.
+     * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for subnetwork to set. + * @return This builder for chaining. + */ + public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subnetwork_ = value; + onChanged(); + return this; + } + + private int diskSizeGb_; + /** + * + * + *
+     * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+     * If unspecified, defaults to 100GB. Cannot be updated.
+     * 
+ * + * int32 disk_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + @java.lang.Override + public int getDiskSizeGb() { + return diskSizeGb_; + } + /** + * + * + *
+     * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+     * If unspecified, defaults to 100GB. Cannot be updated.
+     * 
+ * + * int32 disk_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The diskSizeGb to set. + * @return This builder for chaining. + */ + public Builder setDiskSizeGb(int value) { + + diskSizeGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+     * If unspecified, defaults to 100GB. Cannot be updated.
+     * 
+ * + * int32 disk_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDiskSizeGb() { + + diskSizeGb_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList oauthScopes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureOauthScopesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + oauthScopes_ = new com.google.protobuf.LazyStringArrayList(oauthScopes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the oauthScopes. + */ + public com.google.protobuf.ProtocolStringList getOauthScopesList() { + return oauthScopes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of oauthScopes. + */ + public int getOauthScopesCount() { + return oauthScopes_.size(); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The oauthScopes at the given index. + */ + public java.lang.String getOauthScopes(int index) { + return oauthScopes_.get(index); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the oauthScopes at the given index. + */ + public com.google.protobuf.ByteString getOauthScopesBytes(int index) { + return oauthScopes_.getByteString(index); + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The oauthScopes to set. + * @return This builder for chaining. + */ + public Builder setOauthScopes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOauthScopesIsMutable(); + oauthScopes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The oauthScopes to add. + * @return This builder for chaining. + */ + public Builder addOauthScopes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOauthScopesIsMutable(); + oauthScopes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The oauthScopes to add. + * @return This builder for chaining. + */ + public Builder addAllOauthScopes(java.lang.Iterable values) { + ensureOauthScopesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, oauthScopes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOauthScopes() { + oauthScopes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of Google API scopes to be made available on all
+     * node VMs. If `oauth_scopes` is empty, defaults to
+     * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+     * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the oauthScopes to add. + * @return This builder for chaining. + */ + public Builder addOauthScopesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOauthScopesIsMutable(); + oauthScopes_.add(value); + onChanged(); + return this; + } + + private java.lang.Object serviceAccount_ = ""; + /** + * + * + *
+     * Optional. The Google Cloud Platform Service Account to be used by the workloads. If a
+     * service account is not specified, the "default" Compute Engine service
+     * account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7 [(.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 Google Cloud Platform Service Account to be used by the workloads. If a
+     * service account is not specified, the "default" Compute Engine service
+     * account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7 [(.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 Google Cloud Platform Service Account to be used by the workloads. If a
+     * service account is not specified, the "default" Compute Engine service
+     * account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7 [(.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 Google Cloud Platform Service Account to be used by the workloads. If a
+     * service account is not specified, the "default" Compute Engine service
+     * account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearServiceAccount() { + + serviceAccount_ = getDefaultInstance().getServiceAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Google Cloud Platform Service Account to be used by the workloads. If a
+     * service account is not specified, the "default" Compute Engine service
+     * account is used. Cannot be updated.
+     * 
+ * + * string service_account = 7 [(.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 tags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + public com.google.protobuf.ProtocolStringList getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + public int getTagsCount() { + return tags_.size(); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The list of instance tags applied to all node VMs. Tags are used
+     * to identify valid sources or targets for network firewalls. Each tag within
+     * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+     * Cannot be updated.
+     * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + ipAllocationPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder> + ipAllocationPolicyBuilder_; + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipAllocationPolicy field is set. + */ + public boolean hasIpAllocationPolicy() { + return ipAllocationPolicyBuilder_ != null || ipAllocationPolicy_ != null; + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipAllocationPolicy. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + getIpAllocationPolicy() { + if (ipAllocationPolicyBuilder_ == null) { + return ipAllocationPolicy_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + .getDefaultInstance() + : ipAllocationPolicy_; + } else { + return ipAllocationPolicyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpAllocationPolicy( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy value) { + if (ipAllocationPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ipAllocationPolicy_ = value; + onChanged(); + } else { + ipAllocationPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpAllocationPolicy( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder + builderForValue) { + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicy_ = builderForValue.build(); + onChanged(); + } else { + ipAllocationPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIpAllocationPolicy( + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy value) { + if (ipAllocationPolicyBuilder_ == null) { + if (ipAllocationPolicy_ != null) { + ipAllocationPolicy_ = + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.newBuilder( + ipAllocationPolicy_) + .mergeFrom(value) + .buildPartial(); + } else { + ipAllocationPolicy_ = value; + } + onChanged(); + } else { + ipAllocationPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIpAllocationPolicy() { + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicy_ = null; + onChanged(); + } else { + ipAllocationPolicy_ = null; + ipAllocationPolicyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder + getIpAllocationPolicyBuilder() { + + onChanged(); + return getIpAllocationPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder + getIpAllocationPolicyOrBuilder() { + if (ipAllocationPolicyBuilder_ != null) { + return ipAllocationPolicyBuilder_.getMessageOrBuilder(); + } else { + return ipAllocationPolicy_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + .getDefaultInstance() + : ipAllocationPolicy_; + } + } + /** + * + * + *
+     * Optional. The IPAllocationPolicy fields for the GKE cluster.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder> + getIpAllocationPolicyFieldBuilder() { + if (ipAllocationPolicyBuilder_ == null) { + ipAllocationPolicyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder>( + getIpAllocationPolicy(), getParentForChildren(), isClean()); + ipAllocationPolicy_ = null; + } + return ipAllocationPolicyBuilder_; + } + + private int maxPodsPerNode_; + /** + * + * + *
+     * Optional. The maximum number of pods per node in the Cloud Composer GKE cluster.
+     * The value must be between 8 and 110 and it can be set only if
+     * the environment is VPC-native.
+     * The default value is 32. Values of this field will be propagated both to
+     * the `default-pool` node pool of the newly created GKE cluster, and to the
+     * default "Maximum Pods per Node" value which is used for newly created
+     * node pools if their value is not explicitly set during node pool creation.
+     * For more information, see [Optimizing IP address allocation]
+     * (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr).
+     * Cannot be updated.
+     * 
+ * + * int32 max_pods_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxPodsPerNode. + */ + @java.lang.Override + public int getMaxPodsPerNode() { + return maxPodsPerNode_; + } + /** + * + * + *
+     * Optional. The maximum number of pods per node in the Cloud Composer GKE cluster.
+     * The value must be between 8 and 110 and it can be set only if
+     * the environment is VPC-native.
+     * The default value is 32. Values of this field will be propagated both to
+     * the `default-pool` node pool of the newly created GKE cluster, and to the
+     * default "Maximum Pods per Node" value which is used for newly created
+     * node pools if their value is not explicitly set during node pool creation.
+     * For more information, see [Optimizing IP address allocation]
+     * (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr).
+     * Cannot be updated.
+     * 
+ * + * int32 max_pods_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxPodsPerNode to set. + * @return This builder for chaining. + */ + public Builder setMaxPodsPerNode(int value) { + + maxPodsPerNode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of pods per node in the Cloud Composer GKE cluster.
+     * The value must be between 8 and 110 and it can be set only if
+     * the environment is VPC-native.
+     * The default value is 32. Values of this field will be propagated both to
+     * the `default-pool` node pool of the newly created GKE cluster, and to the
+     * default "Maximum Pods per Node" value which is used for newly created
+     * node pools if their value is not explicitly set during node pool creation.
+     * For more information, see [Optimizing IP address allocation]
+     * (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr).
+     * Cannot be updated.
+     * 
+ * + * int32 max_pods_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxPodsPerNode() { + + maxPodsPerNode_ = 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.orchestration.airflow.service.v1beta1.NodeConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NodeConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NodeConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/NodeConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/NodeConfigOrBuilder.java new file mode 100644 index 00000000..c1a7368b --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/NodeConfigOrBuilder.java @@ -0,0 +1,444 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface NodeConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which
+   * to deploy the VMs used to run the Apache Airflow software, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}".
+   * This `location` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.machineType` are specified,
+   * `nodeConfig.machineType` must belong to this `location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If only one field (`location` or `nodeConfig.machineType`) is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * 
+ * + * string location = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Optional. The Compute Engine
+   * [machine type](/compute/docs/machine-types) used for cluster instances,
+   * specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}".
+   * The `machineType` must belong to the enclosing environment's project and
+   * location. If both this field and `nodeConfig.location` are specified,
+   * this `machineType` must belong to the `nodeConfig.location`; if both are
+   * unspecified, the service will pick a zone in the Compute Engine region
+   * corresponding to the Cloud Composer location, and propagate that choice to
+   * both fields. If exactly one of this field and `nodeConfig.location` is
+   * specified, the location information from the specified field will be
+   * propagated to the unspecified field.
+   * The `machineTypeId` must not be a [shared-core machine
+   * type](/compute/docs/machine-types#sharedcore).
+   * If this field is unspecified, the `machineTypeId` defaults
+   * to "n1-standard-1".
+   * 
+ * + * string machine_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the default network in the environment's project is used.
+   * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The network. + */ + java.lang.String getNetwork(); + /** + * + * + *
+   * Optional. The Compute Engine network to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/global/networks/{networkId}".
+   * If unspecified, the default network in the environment's project is used.
+   * If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets)
+   * is provided, `nodeConfig.subnetwork` must also be provided. For
+   * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see
+   * `nodeConfig.subnetwork`.
+   * 
+ * + * string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subnetwork. + */ + java.lang.String getSubnetwork(); + /** + * + * + *
+   * Optional. The Compute Engine subnetwork to be used for machine
+   * communications, specified as a
+   * [relative resource
+   * name](/apis/design/resource_names#relative_resource_name). For example:
+   * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}"
+   * If a subnetwork is provided, `nodeConfig.network` must also be provided,
+   * and the subnetwork must belong to the enclosing environment's project and
+   * location.
+   * 
+ * + * string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subnetwork. + */ + com.google.protobuf.ByteString getSubnetworkBytes(); + + /** + * + * + *
+   * Optional. The disk size in GB used for node VMs. Minimum size is 20GB.
+   * If unspecified, defaults to 100GB. Cannot be updated.
+   * 
+ * + * int32 disk_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The diskSizeGb. + */ + int getDiskSizeGb(); + + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the oauthScopes. + */ + java.util.List getOauthScopesList(); + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of oauthScopes. + */ + int getOauthScopesCount(); + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The oauthScopes at the given index. + */ + java.lang.String getOauthScopes(int index); + /** + * + * + *
+   * Optional. The set of Google API scopes to be made available on all
+   * node VMs. If `oauth_scopes` is empty, defaults to
+   * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated.
+   * 
+ * + * repeated string oauth_scopes = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the oauthScopes at the given index. + */ + com.google.protobuf.ByteString getOauthScopesBytes(int index); + + /** + * + * + *
+   * Optional. The Google Cloud Platform Service Account to be used by the workloads. If a
+   * service account is not specified, the "default" Compute Engine service
+   * account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The serviceAccount. + */ + java.lang.String getServiceAccount(); + /** + * + * + *
+   * Optional. The Google Cloud Platform Service Account to be used by the workloads. If a
+   * service account is not specified, the "default" Compute Engine service
+   * account is used. Cannot be updated.
+   * 
+ * + * string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for serviceAccount. + */ + com.google.protobuf.ByteString getServiceAccountBytes(); + + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the tags. + */ + java.util.List getTagsList(); + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of tags. + */ + int getTagsCount(); + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The tags at the given index. + */ + java.lang.String getTags(int index); + /** + * + * + *
+   * Optional. The list of instance tags applied to all node VMs. Tags are used
+   * to identify valid sources or targets for network firewalls. Each tag within
+   * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
+   * Cannot be updated.
+   * 
+ * + * repeated string tags = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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); + + /** + * + * + *
+   * Optional. The IPAllocationPolicy fields for the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipAllocationPolicy field is set. + */ + boolean hasIpAllocationPolicy(); + /** + * + * + *
+   * Optional. The IPAllocationPolicy fields for the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipAllocationPolicy. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy getIpAllocationPolicy(); + /** + * + * + *
+   * Optional. The IPAllocationPolicy fields for the GKE cluster.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicyOrBuilder + getIpAllocationPolicyOrBuilder(); + + /** + * + * + *
+   * Optional. The maximum number of pods per node in the Cloud Composer GKE cluster.
+   * The value must be between 8 and 110 and it can be set only if
+   * the environment is VPC-native.
+   * The default value is 32. Values of this field will be propagated both to
+   * the `default-pool` node pool of the newly created GKE cluster, and to the
+   * default "Maximum Pods per Node" value which is used for newly created
+   * node pools if their value is not explicitly set during node pool creation.
+   * For more information, see [Optimizing IP address allocation]
+   * (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr).
+   * Cannot be updated.
+   * 
+ * + * int32 max_pods_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxPodsPerNode. + */ + int getMaxPodsPerNode(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java new file mode 100644 index 00000000..e5f8028b --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadata.java @@ -0,0 +1,2153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/operations.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Metadata describing an operation.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + OperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperationMetadata.newBuilder() to construct. + private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperationMetadata() { + state_ = 0; + operationType_ = 0; + resource_ = ""; + resourceUuid_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + operationType_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + resource_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + resourceUuid_ = s; + break; + } + case 42: + { + 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 50: + { + 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; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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.orchestration.airflow.service.v1beta1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.class, + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Builder.class); + } + + /** + * + * + *
+   * An enum describing the overall state of an operation.
+   * 
+ * + * Protobuf enum {@code + * google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The operation has been created but is not yet started.
+     * 
+ * + * PENDING = 1; + */ + PENDING(1), + /** + * + * + *
+     * The operation is underway.
+     * 
+ * + * RUNNING = 2; + */ + RUNNING(2), + /** + * + * + *
+     * The operation completed successfully.
+     * 
+ * + * SUCCESSFUL = 3; + */ + SUCCESSFUL(3), + /** + * + * + *
+     * The operation is no longer running but did not succeed.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unused.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The operation has been created but is not yet started.
+     * 
+ * + * PENDING = 1; + */ + public static final int PENDING_VALUE = 1; + /** + * + * + *
+     * The operation is underway.
+     * 
+ * + * RUNNING = 2; + */ + public static final int RUNNING_VALUE = 2; + /** + * + * + *
+     * The operation completed successfully.
+     * 
+ * + * SUCCESSFUL = 3; + */ + public static final int SUCCESSFUL_VALUE = 3; + /** + * + * + *
+     * The operation is no longer running but did not succeed.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static State forNumber(int value) { + switch (value) { + case 0: + return STATE_UNSPECIFIED; + case 1: + return PENDING; + case 2: + return RUNNING; + case 3: + return SUCCESSFUL; + case 4: + return FAILED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + .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.orchestration.airflow.service.v1beta1.OperationMetadata.State) + } + + /** + * + * + *
+   * Type of longrunning operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * A resource creation operation.
+     * 
+ * + * CREATE = 1; + */ + CREATE(1), + /** + * + * + *
+     * A resource deletion operation.
+     * 
+ * + * DELETE = 2; + */ + DELETE(2), + /** + * + * + *
+     * A resource update operation.
+     * 
+ * + * UPDATE = 3; + */ + UPDATE(3), + /** + * + * + *
+     * A resource check operation.
+     * 
+ * + * CHECK = 4; + */ + CHECK(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unused.
+     * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * A resource creation operation.
+     * 
+ * + * CREATE = 1; + */ + public static final int CREATE_VALUE = 1; + /** + * + * + *
+     * A resource deletion operation.
+     * 
+ * + * DELETE = 2; + */ + public static final int DELETE_VALUE = 2; + /** + * + * + *
+     * A resource update operation.
+     * 
+ * + * UPDATE = 3; + */ + public static final int UPDATE_VALUE = 3; + /** + * + * + *
+     * A resource check operation.
+     * 
+ * + * CHECK = 4; + */ + public static final int CHECK_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static 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 CREATE; + case 2: + return DELETE; + case 3: + return UPDATE; + case 4: + return CHECK; + 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.orchestration.airflow.service.v1beta1.OperationMetadata + .getDescriptor() + .getEnumTypes() + .get(1); + } + + 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.orchestration.airflow.service.v1beta1.OperationMetadata.Type) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State result = + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State.valueOf( + state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State + .UNRECOGNIZED + : result; + } + + public static final int OPERATION_TYPE_FIELD_NUMBER = 2; + private int operationType_; + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type result = + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type.valueOf( + operationType_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type.UNRECOGNIZED + : result; + } + + public static final int RESOURCE_FIELD_NUMBER = 3; + private volatile java.lang.Object resource_; + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_UUID_FIELD_NUMBER = 4; + private volatile java.lang.Object resourceUuid_; + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The resourceUuid. + */ + @java.lang.Override + public java.lang.String getResourceUuid() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUuid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The bytes for resourceUuid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceUuidBytes() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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.orchestration.airflow.service.v1beta1.OperationMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (operationType_ + != com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + .TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, operationType_); + } + if (!getResourceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resource_); + } + if (!getResourceUuidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, resourceUuid_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (endTime_ != null) { + output.writeMessage(6, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State + .STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (operationType_ + != com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + .TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, operationType_); + } + if (!getResourceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resource_); + } + if (!getResourceUuidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, resourceUuid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata other = + (com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) obj; + + if (state_ != other.state_) return false; + if (operationType_ != other.operationType_) return false; + if (!getResource().equals(other.getResource())) return false; + if (!getResourceUuid().equals(other.getResourceUuid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.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) + OPERATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + operationType_; + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + hash = (37 * hash) + RESOURCE_UUID_FIELD_NUMBER; + hash = (53 * hash) + getResourceUuid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata describing an operation.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.class, + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + state_ = 0; + + operationType_ = 0; + + resource_ = ""; + + resourceUuid_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.OperationsProto + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata build() { + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata result = + new com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(this); + result.state_ = state_; + result.operationType_ = operationType_; + result.resource_ = resource_; + result.resourceUuid_ = resourceUuid_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.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.orchestration.airflow.service.v1beta1.OperationMetadata) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + .getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.operationType_ != 0) { + setOperationTypeValue(other.getOperationTypeValue()); + } + if (!other.getResource().isEmpty()) { + resource_ = other.resource_; + onChanged(); + } + if (!other.getResourceUuid().isEmpty()) { + resourceUuid_ = other.resourceUuid_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.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. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State + getState() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State result = + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State.valueOf( + state_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The current operation state.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private int operationType_ = 0; + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @param value The enum numeric value on the wire for operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationTypeValue(int value) { + + operationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type result = + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type.valueOf( + operationType_); + return result == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @param value The operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationType( + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type value) { + if (value == null) { + throw new NullPointerException(); + } + + operationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The type of operation being performed.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearOperationType() { + + operationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resource_ = ""; + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = resource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = resource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @return This builder for chaining. + */ + public Builder clearResource() { + + resource_ = getDefaultInstance().getResource(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource being operated on, as a [relative resource name](
+     * /apis/design/resource_names#relative_resource_name).
+     * 
+ * + * string resource = 3; + * + * @param value The bytes for resource to set. + * @return This builder for chaining. + */ + public Builder setResourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resource_ = value; + onChanged(); + return this; + } + + private java.lang.Object resourceUuid_ = ""; + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @return The resourceUuid. + */ + public java.lang.String getResourceUuid() { + java.lang.Object ref = resourceUuid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resourceUuid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @return The bytes for resourceUuid. + */ + public com.google.protobuf.ByteString getResourceUuidBytes() { + java.lang.Object ref = resourceUuid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resourceUuid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @param value The resourceUuid to set. + * @return This builder for chaining. + */ + public Builder setResourceUuid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceUuid_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @return This builder for chaining. + */ + public Builder clearResourceUuid() { + + resourceUuid_ = getDefaultInstance().getResourceUuid(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The UUID of the resource being operated on.
+     * 
+ * + * string resource_uuid = 4; + * + * @param value The bytes for resourceUuid to set. + * @return This builder for chaining. + */ + public Builder setResourceUuidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resourceUuid_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time the operation was submitted to the server.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + 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. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. The time when the operation terminated, regardless of its success.
+     * This field is unset if the operation is still ongoing.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..77b4ad2a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationMetadataOrBuilder.java @@ -0,0 +1,206 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/operations.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+   * Output only. The current operation state.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State state = 1; + * + * + * @return The state. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State getState(); + + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return The enum numeric value on the wire for operationType. + */ + int getOperationTypeValue(); + /** + * + * + *
+   * Output only. The type of operation being performed.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type operation_type = 2; + * + * + * @return The operationType. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type getOperationType(); + + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+   * Output only. The resource being operated on, as a [relative resource name](
+   * /apis/design/resource_names#relative_resource_name).
+   * 
+ * + * string resource = 3; + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The resourceUuid. + */ + java.lang.String getResourceUuid(); + /** + * + * + *
+   * Output only. The UUID of the resource being operated on.
+   * 
+ * + * string resource_uuid = 4; + * + * @return The bytes for resourceUuid. + */ + com.google.protobuf.ByteString getResourceUuidBytes(); + + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time the operation was submitted to the server.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. The time when the operation terminated, regardless of its success.
+   * This field is unset if the operation is still ongoing.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java new file mode 100644 index 00000000..11883d69 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/OperationsProto.java @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/operations.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +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_orchestration_airflow_service_v1beta1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\nCgoogle/cloud/orchestration/airflow/ser" + + "vice/v1beta1/operations.proto\0222google.cl" + + "oud.orchestration.airflow.service.v1beta" + + "1\032\037google/protobuf/timestamp.proto\032\034goog" + + "le/api/annotations.proto\"\376\003\n\021OperationMe" + + "tadata\022Z\n\005state\030\001 \001(\0162K.google.cloud.orc" + + "hestration.airflow.service.v1beta1.Opera" + + "tionMetadata.State\022b\n\016operation_type\030\002 \001" + + "(\0162J.google.cloud.orchestration.airflow." + + "service.v1beta1.OperationMetadata.Type\022\020" + + "\n\010resource\030\003 \001(\t\022\025\n\rresource_uuid\030\004 \001(\t\022" + + "/\n\013create_time\030\005 \001(\0132\032.google.protobuf.T" + + "imestamp\022,\n\010end_time\030\006 \001(\0132\032.google.prot" + + "obuf.Timestamp\"T\n\005State\022\025\n\021STATE_UNSPECI" + + "FIED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\016\n\nSUCC" + + "ESSFUL\020\003\022\n\n\006FAILED\020\004\"K\n\004Type\022\024\n\020TYPE_UNS" + + "PECIFIED\020\000\022\n\n\006CREATE\020\001\022\n\n\006DELETE\020\002\022\n\n\006UP" + + "DATE\020\003\022\t\n\005CHECK\020\004B\246\001\n6com.google.cloud.o" + + "rchestration.airflow.service.v1beta1B\017Op" + + "erationsProtoP\001ZYgoogle.golang.org/genpr" + + "oto/googleapis/cloud/orchestration/airfl" + + "ow/service/v1beta1;serviceb\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_orchestration_airflow_service_v1beta1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_orchestration_airflow_service_v1beta1_OperationMetadata_descriptor, + new java.lang.String[] { + "State", "OperationType", "Resource", "ResourceUuid", "CreateTime", "EndTime", + }); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateClusterConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateClusterConfig.java new file mode 100644 index 00000000..b22808f6 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateClusterConfig.java @@ -0,0 +1,978 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Configuration options for the private GKE cluster in a Cloud Composer
+ * environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} + */ +public final class PrivateClusterConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + PrivateClusterConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateClusterConfig.newBuilder() to construct. + private PrivateClusterConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateClusterConfig() { + masterIpv4CidrBlock_ = ""; + masterIpv4ReservedRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateClusterConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PrivateClusterConfig( + 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: + { + enablePrivateEndpoint_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + masterIpv4CidrBlock_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + masterIpv4ReservedRange_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder + .class); + } + + public static final int ENABLE_PRIVATE_ENDPOINT_FIELD_NUMBER = 1; + private boolean enablePrivateEndpoint_; + /** + * + * + *
+   * Optional. If `true`, access to the public endpoint of the GKE cluster is
+   * denied.
+   * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEndpoint. + */ + @java.lang.Override + public boolean getEnablePrivateEndpoint() { + return enablePrivateEndpoint_; + } + + public static final int MASTER_IPV4_CIDR_BLOCK_FIELD_NUMBER = 2; + private volatile java.lang.Object masterIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The masterIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getMasterIpv4CidrBlock() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for masterIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMasterIpv4CidrBlockBytes() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MASTER_IPV4_RESERVED_RANGE_FIELD_NUMBER = 3; + private volatile java.lang.Object masterIpv4ReservedRange_; + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The masterIpv4ReservedRange. + */ + @java.lang.Override + public java.lang.String getMasterIpv4ReservedRange() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4ReservedRange_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for masterIpv4ReservedRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMasterIpv4ReservedRangeBytes() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4ReservedRange_ = 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 (enablePrivateEndpoint_ != false) { + output.writeBool(1, enablePrivateEndpoint_); + } + if (!getMasterIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, masterIpv4CidrBlock_); + } + if (!getMasterIpv4ReservedRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, masterIpv4ReservedRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePrivateEndpoint_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateEndpoint_); + } + if (!getMasterIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, masterIpv4CidrBlock_); + } + if (!getMasterIpv4ReservedRangeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, masterIpv4ReservedRange_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) obj; + + if (getEnablePrivateEndpoint() != other.getEnablePrivateEndpoint()) return false; + if (!getMasterIpv4CidrBlock().equals(other.getMasterIpv4CidrBlock())) return false; + if (!getMasterIpv4ReservedRange().equals(other.getMasterIpv4ReservedRange())) return false; + if (!unknownFields.equals(other.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_PRIVATE_ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateEndpoint()); + hash = (37 * hash) + MASTER_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getMasterIpv4CidrBlock().hashCode(); + hash = (37 * hash) + MASTER_IPV4_RESERVED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getMasterIpv4ReservedRange().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 options for the private GKE cluster in a Cloud Composer
+   * environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enablePrivateEndpoint_ = false; + + masterIpv4CidrBlock_ = ""; + + masterIpv4ReservedRange_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateClusterConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(this); + result.enablePrivateEndpoint_ = enablePrivateEndpoint_; + result.masterIpv4CidrBlock_ = masterIpv4CidrBlock_; + result.masterIpv4ReservedRange_ = masterIpv4ReservedRange_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .getDefaultInstance()) return this; + if (other.getEnablePrivateEndpoint() != false) { + setEnablePrivateEndpoint(other.getEnablePrivateEndpoint()); + } + if (!other.getMasterIpv4CidrBlock().isEmpty()) { + masterIpv4CidrBlock_ = other.masterIpv4CidrBlock_; + onChanged(); + } + if (!other.getMasterIpv4ReservedRange().isEmpty()) { + masterIpv4ReservedRange_ = other.masterIpv4ReservedRange_; + 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.orchestration.airflow.service.v1beta1.PrivateClusterConfig parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enablePrivateEndpoint_; + /** + * + * + *
+     * Optional. If `true`, access to the public endpoint of the GKE cluster is
+     * denied.
+     * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEndpoint. + */ + @java.lang.Override + public boolean getEnablePrivateEndpoint() { + return enablePrivateEndpoint_; + } + /** + * + * + *
+     * Optional. If `true`, access to the public endpoint of the GKE cluster is
+     * denied.
+     * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePrivateEndpoint to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateEndpoint(boolean value) { + + enablePrivateEndpoint_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If `true`, access to the public endpoint of the GKE cluster is
+     * denied.
+     * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateEndpoint() { + + enablePrivateEndpoint_ = false; + onChanged(); + return this; + } + + private java.lang.Object masterIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The masterIpv4CidrBlock. + */ + public java.lang.String getMasterIpv4CidrBlock() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for masterIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getMasterIpv4CidrBlockBytes() { + java.lang.Object ref = masterIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The masterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + masterIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMasterIpv4CidrBlock() { + + masterIpv4CidrBlock_ = getDefaultInstance().getMasterIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+     * left blank, the default value of '172.16.0.0/23' is used.
+     * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for masterIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + masterIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object masterIpv4ReservedRange_ = ""; + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The masterIpv4ReservedRange. + */ + public java.lang.String getMasterIpv4ReservedRange() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + masterIpv4ReservedRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for masterIpv4ReservedRange. + */ + public com.google.protobuf.ByteString getMasterIpv4ReservedRangeBytes() { + java.lang.Object ref = masterIpv4ReservedRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + masterIpv4ReservedRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The masterIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4ReservedRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + masterIpv4ReservedRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearMasterIpv4ReservedRange() { + + masterIpv4ReservedRange_ = getDefaultInstance().getMasterIpv4ReservedRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range in CIDR notation to use for the hosted master network. This
+     * range is used for assigning internal IP addresses to the cluster
+     * master or set of masters and to the internal load balancer virtual IP.
+     * This range must not overlap with any other ranges in use
+     * within the cluster's network.
+     * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for masterIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setMasterIpv4ReservedRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + masterIpv4ReservedRange_ = 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.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateClusterConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrivateClusterConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateClusterConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateClusterConfigOrBuilder.java new file mode 100644 index 00000000..a32d2f4f --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateClusterConfigOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface PrivateClusterConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. If `true`, access to the public endpoint of the GKE cluster is
+   * denied.
+   * 
+ * + * bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEndpoint. + */ + boolean getEnablePrivateEndpoint(); + + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The masterIpv4CidrBlock. + */ + java.lang.String getMasterIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If
+   * left blank, the default value of '172.16.0.0/23' is used.
+   * 
+ * + * string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for masterIpv4CidrBlock. + */ + com.google.protobuf.ByteString getMasterIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The masterIpv4ReservedRange. + */ + java.lang.String getMasterIpv4ReservedRange(); + /** + * + * + *
+   * Output only. The IP range in CIDR notation to use for the hosted master network. This
+   * range is used for assigning internal IP addresses to the cluster
+   * master or set of masters and to the internal load balancer virtual IP.
+   * This range must not overlap with any other ranges in use
+   * within the cluster's network.
+   * 
+ * + * string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for masterIpv4ReservedRange. + */ + com.google.protobuf.ByteString getMasterIpv4ReservedRangeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateEnvironmentConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateEnvironmentConfig.java new file mode 100644 index 00000000..f8dbf2be --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateEnvironmentConfig.java @@ -0,0 +1,1933 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The configuration information for configuring a Private IP Cloud Composer
+ * environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} + */ +public final class PrivateEnvironmentConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + PrivateEnvironmentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateEnvironmentConfig.newBuilder() to construct. + private PrivateEnvironmentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateEnvironmentConfig() { + webServerIpv4CidrBlock_ = ""; + cloudSqlIpv4CidrBlock_ = ""; + webServerIpv4ReservedRange_ = ""; + cloudComposerNetworkIpv4CidrBlock_ = ""; + cloudComposerNetworkIpv4ReservedRange_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateEnvironmentConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PrivateEnvironmentConfig( + 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: + { + enablePrivateEnvironment_ = input.readBool(); + break; + } + case 18: + { + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder + subBuilder = null; + if (privateClusterConfig_ != null) { + subBuilder = privateClusterConfig_.toBuilder(); + } + privateClusterConfig_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(privateClusterConfig_); + privateClusterConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + webServerIpv4CidrBlock_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudSqlIpv4CidrBlock_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + webServerIpv4ReservedRange_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudComposerNetworkIpv4CidrBlock_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudComposerNetworkIpv4ReservedRange_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.Builder + .class); + } + + public static final int ENABLE_PRIVATE_ENVIRONMENT_FIELD_NUMBER = 1; + private boolean enablePrivateEnvironment_; + /** + * + * + *
+   * Optional. If `true`, a Private IP Cloud Composer environment is created.
+   * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+   * set to true .
+   * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEnvironment. + */ + @java.lang.Override + public boolean getEnablePrivateEnvironment() { + return enablePrivateEnvironment_; + } + + public static final int PRIVATE_CLUSTER_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + privateClusterConfig_; + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateClusterConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateClusterConfig() { + return privateClusterConfig_ != null; + } + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateClusterConfig. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + getPrivateClusterConfig() { + return privateClusterConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .getDefaultInstance() + : privateClusterConfig_; + } + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfigOrBuilder + getPrivateClusterConfigOrBuilder() { + return getPrivateClusterConfig(); + } + + public static final int WEB_SERVER_IPV4_CIDR_BLOCK_FIELD_NUMBER = 3; + private volatile java.lang.Object webServerIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The webServerIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getWebServerIpv4CidrBlock() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for webServerIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebServerIpv4CidrBlockBytes() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_SQL_IPV4_CIDR_BLOCK_FIELD_NUMBER = 4; + private volatile java.lang.Object cloudSqlIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cloudSqlIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getCloudSqlIpv4CidrBlock() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for cloudSqlIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudSqlIpv4CidrBlockBytes() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEB_SERVER_IPV4_RESERVED_RANGE_FIELD_NUMBER = 5; + private volatile java.lang.Object webServerIpv4ReservedRange_; + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The webServerIpv4ReservedRange. + */ + @java.lang.Override + public java.lang.String getWebServerIpv4ReservedRange() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4ReservedRange_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for webServerIpv4ReservedRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebServerIpv4ReservedRangeBytes() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4ReservedRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_COMPOSER_NETWORK_IPV4_CIDR_BLOCK_FIELD_NUMBER = 7; + private volatile java.lang.Object cloudComposerNetworkIpv4CidrBlock_; + /** + * + * + *
+   * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+   * project will be reserved. Needs to be disjoint from
+   * private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudComposerNetworkIpv4CidrBlock. + */ + @java.lang.Override + public java.lang.String getCloudComposerNetworkIpv4CidrBlock() { + java.lang.Object ref = cloudComposerNetworkIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudComposerNetworkIpv4CidrBlock_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+   * project will be reserved. Needs to be disjoint from
+   * private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for cloudComposerNetworkIpv4CidrBlock. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudComposerNetworkIpv4CidrBlockBytes() { + java.lang.Object ref = cloudComposerNetworkIpv4CidrBlock_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudComposerNetworkIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_COMPOSER_NETWORK_IPV4_RESERVED_RANGE_FIELD_NUMBER = 8; + private volatile java.lang.Object cloudComposerNetworkIpv4ReservedRange_; + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudComposerNetworkIpv4ReservedRange. + */ + @java.lang.Override + public java.lang.String getCloudComposerNetworkIpv4ReservedRange() { + java.lang.Object ref = cloudComposerNetworkIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudComposerNetworkIpv4ReservedRange_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for cloudComposerNetworkIpv4ReservedRange. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudComposerNetworkIpv4ReservedRangeBytes() { + java.lang.Object ref = cloudComposerNetworkIpv4ReservedRange_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudComposerNetworkIpv4ReservedRange_ = 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 (enablePrivateEnvironment_ != false) { + output.writeBool(1, enablePrivateEnvironment_); + } + if (privateClusterConfig_ != null) { + output.writeMessage(2, getPrivateClusterConfig()); + } + if (!getWebServerIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, webServerIpv4CidrBlock_); + } + if (!getCloudSqlIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, cloudSqlIpv4CidrBlock_); + } + if (!getWebServerIpv4ReservedRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, webServerIpv4ReservedRange_); + } + if (!getCloudComposerNetworkIpv4CidrBlockBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 7, cloudComposerNetworkIpv4CidrBlock_); + } + if (!getCloudComposerNetworkIpv4ReservedRangeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 8, cloudComposerNetworkIpv4ReservedRange_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePrivateEnvironment_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateEnvironment_); + } + if (privateClusterConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrivateClusterConfig()); + } + if (!getWebServerIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, webServerIpv4CidrBlock_); + } + if (!getCloudSqlIpv4CidrBlockBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, cloudSqlIpv4CidrBlock_); + } + if (!getWebServerIpv4ReservedRangeBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(5, webServerIpv4ReservedRange_); + } + if (!getCloudComposerNetworkIpv4CidrBlockBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 7, cloudComposerNetworkIpv4CidrBlock_); + } + if (!getCloudComposerNetworkIpv4ReservedRangeBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 8, cloudComposerNetworkIpv4ReservedRange_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) obj; + + if (getEnablePrivateEnvironment() != other.getEnablePrivateEnvironment()) return false; + if (hasPrivateClusterConfig() != other.hasPrivateClusterConfig()) return false; + if (hasPrivateClusterConfig()) { + if (!getPrivateClusterConfig().equals(other.getPrivateClusterConfig())) return false; + } + if (!getWebServerIpv4CidrBlock().equals(other.getWebServerIpv4CidrBlock())) return false; + if (!getCloudSqlIpv4CidrBlock().equals(other.getCloudSqlIpv4CidrBlock())) return false; + if (!getWebServerIpv4ReservedRange().equals(other.getWebServerIpv4ReservedRange())) + return false; + if (!getCloudComposerNetworkIpv4CidrBlock() + .equals(other.getCloudComposerNetworkIpv4CidrBlock())) return false; + if (!getCloudComposerNetworkIpv4ReservedRange() + .equals(other.getCloudComposerNetworkIpv4ReservedRange())) return false; + if (!unknownFields.equals(other.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_PRIVATE_ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateEnvironment()); + if (hasPrivateClusterConfig()) { + hash = (37 * hash) + PRIVATE_CLUSTER_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateClusterConfig().hashCode(); + } + hash = (37 * hash) + WEB_SERVER_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getWebServerIpv4CidrBlock().hashCode(); + hash = (37 * hash) + CLOUD_SQL_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getCloudSqlIpv4CidrBlock().hashCode(); + hash = (37 * hash) + WEB_SERVER_IPV4_RESERVED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getWebServerIpv4ReservedRange().hashCode(); + hash = (37 * hash) + CLOUD_COMPOSER_NETWORK_IPV4_CIDR_BLOCK_FIELD_NUMBER; + hash = (53 * hash) + getCloudComposerNetworkIpv4CidrBlock().hashCode(); + hash = (37 * hash) + CLOUD_COMPOSER_NETWORK_IPV4_RESERVED_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getCloudComposerNetworkIpv4ReservedRange().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration information for configuring a Private IP Cloud Composer
+   * environment.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enablePrivateEnvironment_ = false; + + if (privateClusterConfigBuilder_ == null) { + privateClusterConfig_ = null; + } else { + privateClusterConfig_ = null; + privateClusterConfigBuilder_ = null; + } + webServerIpv4CidrBlock_ = ""; + + cloudSqlIpv4CidrBlock_ = ""; + + webServerIpv4ReservedRange_ = ""; + + cloudComposerNetworkIpv4CidrBlock_ = ""; + + cloudComposerNetworkIpv4ReservedRange_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_PrivateEnvironmentConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(this); + result.enablePrivateEnvironment_ = enablePrivateEnvironment_; + if (privateClusterConfigBuilder_ == null) { + result.privateClusterConfig_ = privateClusterConfig_; + } else { + result.privateClusterConfig_ = privateClusterConfigBuilder_.build(); + } + result.webServerIpv4CidrBlock_ = webServerIpv4CidrBlock_; + result.cloudSqlIpv4CidrBlock_ = cloudSqlIpv4CidrBlock_; + result.webServerIpv4ReservedRange_ = webServerIpv4ReservedRange_; + result.cloudComposerNetworkIpv4CidrBlock_ = cloudComposerNetworkIpv4CidrBlock_; + result.cloudComposerNetworkIpv4ReservedRange_ = cloudComposerNetworkIpv4ReservedRange_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + .getDefaultInstance()) return this; + if (other.getEnablePrivateEnvironment() != false) { + setEnablePrivateEnvironment(other.getEnablePrivateEnvironment()); + } + if (other.hasPrivateClusterConfig()) { + mergePrivateClusterConfig(other.getPrivateClusterConfig()); + } + if (!other.getWebServerIpv4CidrBlock().isEmpty()) { + webServerIpv4CidrBlock_ = other.webServerIpv4CidrBlock_; + onChanged(); + } + if (!other.getCloudSqlIpv4CidrBlock().isEmpty()) { + cloudSqlIpv4CidrBlock_ = other.cloudSqlIpv4CidrBlock_; + onChanged(); + } + if (!other.getWebServerIpv4ReservedRange().isEmpty()) { + webServerIpv4ReservedRange_ = other.webServerIpv4ReservedRange_; + onChanged(); + } + if (!other.getCloudComposerNetworkIpv4CidrBlock().isEmpty()) { + cloudComposerNetworkIpv4CidrBlock_ = other.cloudComposerNetworkIpv4CidrBlock_; + onChanged(); + } + if (!other.getCloudComposerNetworkIpv4ReservedRange().isEmpty()) { + cloudComposerNetworkIpv4ReservedRange_ = other.cloudComposerNetworkIpv4ReservedRange_; + 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.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enablePrivateEnvironment_; + /** + * + * + *
+     * Optional. If `true`, a Private IP Cloud Composer environment is created.
+     * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+     * set to true .
+     * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEnvironment. + */ + @java.lang.Override + public boolean getEnablePrivateEnvironment() { + return enablePrivateEnvironment_; + } + /** + * + * + *
+     * Optional. If `true`, a Private IP Cloud Composer environment is created.
+     * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+     * set to true .
+     * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The enablePrivateEnvironment to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateEnvironment(boolean value) { + + enablePrivateEnvironment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If `true`, a Private IP Cloud Composer environment is created.
+     * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+     * set to true .
+     * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateEnvironment() { + + enablePrivateEnvironment_ = false; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + privateClusterConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfigOrBuilder> + privateClusterConfigBuilder_; + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateClusterConfig field is set. + */ + public boolean hasPrivateClusterConfig() { + return privateClusterConfigBuilder_ != null || privateClusterConfig_ != null; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateClusterConfig. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + getPrivateClusterConfig() { + if (privateClusterConfigBuilder_ == null) { + return privateClusterConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .getDefaultInstance() + : privateClusterConfig_; + } else { + return privateClusterConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateClusterConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig value) { + if (privateClusterConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateClusterConfig_ = value; + onChanged(); + } else { + privateClusterConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateClusterConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder + builderForValue) { + if (privateClusterConfigBuilder_ == null) { + privateClusterConfig_ = builderForValue.build(); + onChanged(); + } else { + privateClusterConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePrivateClusterConfig( + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig value) { + if (privateClusterConfigBuilder_ == null) { + if (privateClusterConfig_ != null) { + privateClusterConfig_ = + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .newBuilder(privateClusterConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + privateClusterConfig_ = value; + } + onChanged(); + } else { + privateClusterConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPrivateClusterConfig() { + if (privateClusterConfigBuilder_ == null) { + privateClusterConfig_ = null; + onChanged(); + } else { + privateClusterConfig_ = null; + privateClusterConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder + getPrivateClusterConfigBuilder() { + + onChanged(); + return getPrivateClusterConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfigOrBuilder + getPrivateClusterConfigOrBuilder() { + if (privateClusterConfigBuilder_ != null) { + return privateClusterConfigBuilder_.getMessageOrBuilder(); + } else { + return privateClusterConfig_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + .getDefaultInstance() + : privateClusterConfig_; + } + } + /** + * + * + *
+     * Optional. Configuration for the private GKE cluster for a Private IP
+     * Cloud Composer environment.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfigOrBuilder> + getPrivateClusterConfigFieldBuilder() { + if (privateClusterConfigBuilder_ == null) { + privateClusterConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig, + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1 + .PrivateClusterConfigOrBuilder>( + getPrivateClusterConfig(), getParentForChildren(), isClean()); + privateClusterConfig_ = null; + } + return privateClusterConfigBuilder_; + } + + private java.lang.Object webServerIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The webServerIpv4CidrBlock. + */ + public java.lang.String getWebServerIpv4CidrBlock() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for webServerIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getWebServerIpv4CidrBlockBytes() { + java.lang.Object ref = webServerIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The webServerIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webServerIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWebServerIpv4CidrBlock() { + + webServerIpv4CidrBlock_ = getDefaultInstance().getWebServerIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+     * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for webServerIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webServerIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object cloudSqlIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cloudSqlIpv4CidrBlock. + */ + public java.lang.String getCloudSqlIpv4CidrBlock() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudSqlIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for cloudSqlIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getCloudSqlIpv4CidrBlockBytes() { + java.lang.Object ref = cloudSqlIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudSqlIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cloudSqlIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudSqlIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCloudSqlIpv4CidrBlock() { + + cloudSqlIpv4CidrBlock_ = getDefaultInstance().getCloudSqlIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range in tenant project will be reserved for
+     * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+     * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for cloudSqlIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCloudSqlIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudSqlIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object webServerIpv4ReservedRange_ = ""; + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The webServerIpv4ReservedRange. + */ + public java.lang.String getWebServerIpv4ReservedRange() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webServerIpv4ReservedRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for webServerIpv4ReservedRange. + */ + public com.google.protobuf.ByteString getWebServerIpv4ReservedRangeBytes() { + java.lang.Object ref = webServerIpv4ReservedRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + webServerIpv4ReservedRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The webServerIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4ReservedRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + webServerIpv4ReservedRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearWebServerIpv4ReservedRange() { + + webServerIpv4ReservedRange_ = getDefaultInstance().getWebServerIpv4ReservedRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's App Engine VMs.
+     * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for webServerIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setWebServerIpv4ReservedRangeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + webServerIpv4ReservedRange_ = value; + onChanged(); + return this; + } + + private java.lang.Object cloudComposerNetworkIpv4CidrBlock_ = ""; + /** + * + * + *
+     * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+     * project will be reserved. Needs to be disjoint from
+     * private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudComposerNetworkIpv4CidrBlock. + */ + public java.lang.String getCloudComposerNetworkIpv4CidrBlock() { + java.lang.Object ref = cloudComposerNetworkIpv4CidrBlock_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudComposerNetworkIpv4CidrBlock_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+     * project will be reserved. Needs to be disjoint from
+     * private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for cloudComposerNetworkIpv4CidrBlock. + */ + public com.google.protobuf.ByteString getCloudComposerNetworkIpv4CidrBlockBytes() { + java.lang.Object ref = cloudComposerNetworkIpv4CidrBlock_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudComposerNetworkIpv4CidrBlock_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+     * project will be reserved. Needs to be disjoint from
+     * private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The cloudComposerNetworkIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCloudComposerNetworkIpv4CidrBlock(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudComposerNetworkIpv4CidrBlock_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+     * project will be reserved. Needs to be disjoint from
+     * private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearCloudComposerNetworkIpv4CidrBlock() { + + cloudComposerNetworkIpv4CidrBlock_ = + getDefaultInstance().getCloudComposerNetworkIpv4CidrBlock(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+     * project will be reserved. Needs to be disjoint from
+     * private_cluster_config.master_ipv4_cidr_block and
+     * cloud_sql_ipv4_cidr_block.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes for cloudComposerNetworkIpv4CidrBlock to set. + * @return This builder for chaining. + */ + public Builder setCloudComposerNetworkIpv4CidrBlockBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudComposerNetworkIpv4CidrBlock_ = value; + onChanged(); + return this; + } + + private java.lang.Object cloudComposerNetworkIpv4ReservedRange_ = ""; + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudComposerNetworkIpv4ReservedRange. + */ + public java.lang.String getCloudComposerNetworkIpv4ReservedRange() { + java.lang.Object ref = cloudComposerNetworkIpv4ReservedRange_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudComposerNetworkIpv4ReservedRange_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for cloudComposerNetworkIpv4ReservedRange. + */ + public com.google.protobuf.ByteString getCloudComposerNetworkIpv4ReservedRangeBytes() { + java.lang.Object ref = cloudComposerNetworkIpv4ReservedRange_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudComposerNetworkIpv4ReservedRange_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The cloudComposerNetworkIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setCloudComposerNetworkIpv4ReservedRange(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudComposerNetworkIpv4ReservedRange_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearCloudComposerNetworkIpv4ReservedRange() { + + cloudComposerNetworkIpv4ReservedRange_ = + getDefaultInstance().getCloudComposerNetworkIpv4ReservedRange(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+     * This field is supported for Cloud Composer environments in versions
+     * composer-2.*.*-airflow-*.*.* and newer.
+     * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for cloudComposerNetworkIpv4ReservedRange to set. + * @return This builder for chaining. + */ + public Builder setCloudComposerNetworkIpv4ReservedRangeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudComposerNetworkIpv4ReservedRange_ = 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.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .PrivateEnvironmentConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateEnvironmentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PrivateEnvironmentConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateEnvironmentConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateEnvironmentConfigOrBuilder.java new file mode 100644 index 00000000..f1c900ca --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/PrivateEnvironmentConfigOrBuilder.java @@ -0,0 +1,241 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface PrivateEnvironmentConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. If `true`, a Private IP Cloud Composer environment is created.
+   * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be
+   * set to true .
+   * 
+ * + * bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enablePrivateEnvironment. + */ + boolean getEnablePrivateEnvironment(); + + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateClusterConfig field is set. + */ + boolean hasPrivateClusterConfig(); + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateClusterConfig. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + getPrivateClusterConfig(); + /** + * + * + *
+   * Optional. Configuration for the private GKE cluster for a Private IP
+   * Cloud Composer environment.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfigOrBuilder + getPrivateClusterConfigOrBuilder(); + + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The webServerIpv4CidrBlock. + */ + java.lang.String getWebServerIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IP range for web server will be reserved. Needs
+   * to be disjoint from private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * 
+ * + * string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for webServerIpv4CidrBlock. + */ + com.google.protobuf.ByteString getWebServerIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cloudSqlIpv4CidrBlock. + */ + java.lang.String getCloudSqlIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IP range in tenant project will be reserved for
+   * Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block
+   * 
+ * + * string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for cloudSqlIpv4CidrBlock. + */ + com.google.protobuf.ByteString getCloudSqlIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The webServerIpv4ReservedRange. + */ + java.lang.String getWebServerIpv4ReservedRange(); + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's App Engine VMs.
+   * 
+ * + * string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for webServerIpv4ReservedRange. + */ + com.google.protobuf.ByteString getWebServerIpv4ReservedRangeBytes(); + + /** + * + * + *
+   * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+   * project will be reserved. Needs to be disjoint from
+   * private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The cloudComposerNetworkIpv4CidrBlock. + */ + java.lang.String getCloudComposerNetworkIpv4CidrBlock(); + /** + * + * + *
+   * Optional. The CIDR block from which IP range for Cloud Composer Network in tenant
+   * project will be reserved. Needs to be disjoint from
+   * private_cluster_config.master_ipv4_cidr_block and
+   * cloud_sql_ipv4_cidr_block.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bytes for cloudComposerNetworkIpv4CidrBlock. + */ + com.google.protobuf.ByteString getCloudComposerNetworkIpv4CidrBlockBytes(); + + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudComposerNetworkIpv4ReservedRange. + */ + java.lang.String getCloudComposerNetworkIpv4ReservedRange(); + /** + * + * + *
+   * Output only. The IP range reserved for the tenant project's Cloud Composer network.
+   * This field is supported for Cloud Composer environments in versions
+   * composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * + * string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for cloudComposerNetworkIpv4ReservedRange. + */ + com.google.protobuf.ByteString getCloudComposerNetworkIpv4ReservedRangeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/RestartWebServerRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/RestartWebServerRequest.java new file mode 100644 index 00000000..7eb03ce8 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/RestartWebServerRequest.java @@ -0,0 +1,679 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Restart Airflow web server.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} + */ +public final class RestartWebServerRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + RestartWebServerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RestartWebServerRequest.newBuilder() to construct. + private RestartWebServerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RestartWebServerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RestartWebServerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RestartWebServerRequest( + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The resource name of the environment to restart the web server for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The resource name of the environment to restart the web server for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) 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.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Restart Airflow web server.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.Builder + .class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_RestartWebServerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(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.orchestration.airflow.service.v1beta1.RestartWebServerRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + .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.orchestration.airflow.service.v1beta1.RestartWebServerRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The resource name of the environment to restart the web server for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to restart the web server for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The resource name of the environment to restart the web server for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to restart the web server for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the environment to restart the web server for, in the
+     * form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .RestartWebServerRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RestartWebServerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RestartWebServerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/RestartWebServerRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/RestartWebServerRequestOrBuilder.java new file mode 100644 index 00000000..29c80df5 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/RestartWebServerRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface RestartWebServerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the environment to restart the web server for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The resource name of the environment to restart the web server for, in the
+   * form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/SoftwareConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/SoftwareConfig.java new file mode 100644 index 00000000..9a1b5747 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/SoftwareConfig.java @@ -0,0 +1,2364 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Specifies the selection and configuration of software inside the environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} + */ +public final class SoftwareConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.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_ = ""; + pythonVersion_ = ""; + } + + @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)) { + airflowConfigOverrides_ = + com.google.protobuf.MapField.newMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + airflowConfigOverrides__ = + input.readMessage( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + airflowConfigOverrides_ + .getMutableMap() + .put(airflowConfigOverrides__.getKey(), airflowConfigOverrides__.getValue()); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + pypiPackages_ = + com.google.protobuf.MapField.newMapField( + PypiPackagesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry pypiPackages__ = + input.readMessage( + PypiPackagesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + pypiPackages_.getMutableMap().put(pypiPackages__.getKey(), pypiPackages__.getValue()); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + envVariables_ = + com.google.protobuf.MapField.newMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry envVariables__ = + input.readMessage( + EnvVariablesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + envVariables_.getMutableMap().put(envVariables__.getKey(), envVariables__.getValue()); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pythonVersion_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetAirflowConfigOverrides(); + case 3: + return internalGetPypiPackages(); + case 4: + return internalGetEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder.class); + } + + public static final int IMAGE_VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object imageVersion_; + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @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; + } + } + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @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 AIRFLOW_CONFIG_OVERRIDES_FIELD_NUMBER = 2; + + private static final class AirflowConfigOverridesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_AirflowConfigOverridesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField airflowConfigOverrides_; + + private com.google.protobuf.MapField + internalGetAirflowConfigOverrides() { + if (airflowConfigOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + } + return airflowConfigOverrides_; + } + + public int getAirflowConfigOverridesCount() { + return internalGetAirflowConfigOverrides().getMap().size(); + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAirflowConfigOverrides(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAirflowConfigOverrides().getMap().containsKey(key); + } + /** Use {@link #getAirflowConfigOverridesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAirflowConfigOverrides() { + return getAirflowConfigOverridesMap(); + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAirflowConfigOverridesMap() { + return internalGetAirflowConfigOverrides().getMap(); + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PYPI_PACKAGES_FIELD_NUMBER = 3; + + private static final class PypiPackagesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_PypiPackagesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField pypiPackages_; + + private com.google.protobuf.MapField + internalGetPypiPackages() { + if (pypiPackages_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiPackagesDefaultEntryHolder.defaultEntry); + } + return pypiPackages_; + } + + public int getPypiPackagesCount() { + return internalGetPypiPackages().getMap().size(); + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsPypiPackages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiPackages().getMap().containsKey(key); + } + /** Use {@link #getPypiPackagesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiPackages() { + return getPypiPackagesMap(); + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getPypiPackagesMap() { + return internalGetPypiPackages().getMap(); + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ENV_VARIABLES_FIELD_NUMBER = 4; + + private static final class EnvVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_EnvVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + private com.google.protobuf.MapField envVariables_; + + private com.google.protobuf.MapField + internalGetEnvVariables() { + if (envVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + } + return envVariables_; + } + + public int getEnvVariablesCount() { + return internalGetEnvVariables().getMap().size(); + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvVariables() { + return getEnvVariablesMap(); + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getEnvVariablesMap() { + return internalGetEnvVariables().getMap(); + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PYTHON_VERSION_FIELD_NUMBER = 6; + private volatile java.lang.Object pythonVersion_; + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pythonVersion. + */ + @java.lang.Override + public java.lang.String getPythonVersion() { + java.lang.Object ref = pythonVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pythonVersion_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pythonVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPythonVersionBytes() { + java.lang.Object ref = pythonVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pythonVersion_ = 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 (!getImageVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageVersion_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetAirflowConfigOverrides(), + AirflowConfigOverridesDefaultEntryHolder.defaultEntry, + 2); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetPypiPackages(), PypiPackagesDefaultEntryHolder.defaultEntry, 3); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetEnvVariables(), EnvVariablesDefaultEntryHolder.defaultEntry, 4); + if (!getPythonVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pythonVersion_); + } + 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 : + internalGetAirflowConfigOverrides().getMap().entrySet()) { + com.google.protobuf.MapEntry airflowConfigOverrides__ = + AirflowConfigOverridesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, airflowConfigOverrides__); + } + for (java.util.Map.Entry entry : + internalGetPypiPackages().getMap().entrySet()) { + com.google.protobuf.MapEntry pypiPackages__ = + PypiPackagesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, pypiPackages__); + } + for (java.util.Map.Entry entry : + internalGetEnvVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry envVariables__ = + EnvVariablesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, envVariables__); + } + if (!getPythonVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pythonVersion_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) obj; + + if (!getImageVersion().equals(other.getImageVersion())) return false; + if (!internalGetAirflowConfigOverrides().equals(other.internalGetAirflowConfigOverrides())) + return false; + if (!internalGetPypiPackages().equals(other.internalGetPypiPackages())) return false; + if (!internalGetEnvVariables().equals(other.internalGetEnvVariables())) return false; + if (!getPythonVersion().equals(other.getPythonVersion())) return false; + if (!unknownFields.equals(other.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 (!internalGetAirflowConfigOverrides().getMap().isEmpty()) { + hash = (37 * hash) + AIRFLOW_CONFIG_OVERRIDES_FIELD_NUMBER; + hash = (53 * hash) + internalGetAirflowConfigOverrides().hashCode(); + } + if (!internalGetPypiPackages().getMap().isEmpty()) { + hash = (37 * hash) + PYPI_PACKAGES_FIELD_NUMBER; + hash = (53 * hash) + internalGetPypiPackages().hashCode(); + } + if (!internalGetEnvVariables().getMap().isEmpty()) { + hash = (37 * hash) + ENV_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetEnvVariables().hashCode(); + } + hash = (37 * hash) + PYTHON_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getPythonVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.SoftwareConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.SoftwareConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.SoftwareConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.SoftwareConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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 configuration of software inside the environment.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetAirflowConfigOverrides(); + case 3: + return internalGetPypiPackages(); + case 4: + return internalGetEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableAirflowConfigOverrides(); + case 3: + return internalGetMutablePypiPackages(); + case 4: + return internalGetMutableEnvVariables(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.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_ = ""; + + internalGetMutableAirflowConfigOverrides().clear(); + internalGetMutablePypiPackages().clear(); + internalGetMutableEnvVariables().clear(); + pythonVersion_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_SoftwareConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(this); + int from_bitField0_ = bitField0_; + result.imageVersion_ = imageVersion_; + result.airflowConfigOverrides_ = internalGetAirflowConfigOverrides(); + result.airflowConfigOverrides_.makeImmutable(); + result.pypiPackages_ = internalGetPypiPackages(); + result.pypiPackages_.makeImmutable(); + result.envVariables_ = internalGetEnvVariables(); + result.envVariables_.makeImmutable(); + result.pythonVersion_ = pythonVersion_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + .getDefaultInstance()) return this; + if (!other.getImageVersion().isEmpty()) { + imageVersion_ = other.imageVersion_; + onChanged(); + } + internalGetMutableAirflowConfigOverrides() + .mergeFrom(other.internalGetAirflowConfigOverrides()); + internalGetMutablePypiPackages().mergeFrom(other.internalGetPypiPackages()); + internalGetMutableEnvVariables().mergeFrom(other.internalGetEnvVariables()); + if (!other.getPythonVersion().isEmpty()) { + pythonVersion_ = other.pythonVersion_; + 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.orchestration.airflow.service.v1beta1.SoftwareConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object imageVersion_ = ""; + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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; + } + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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; + } + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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; + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @return This builder for chaining. + */ + public Builder clearImageVersion() { + + imageVersion_ = getDefaultInstance().getImageVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * The version of the software running in the environment.
+     * This encapsulates both the version of Cloud Composer functionality and the
+     * version of Apache Airflow. It must match the regular expression
+     * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+     * When used as input, the server also checks if the provided version is
+     * supported and denies the request for an unsupported version.
+     * The Cloud Composer portion of the version is a
+     * [semantic version](https://semver.org) or `latest`. When the patch version
+     * is omitted, the current Cloud Composer patch version is selected.
+     * When `latest` is provided instead of an explicit version number,
+     * the server replaces `latest` with the current Cloud Composer version
+     * and stores that version number in the same field.
+     * The portion of the image version that follows *airflow-* is an
+     * official Apache Airflow repository
+     * [release name](https://github.com/apache/incubator-airflow/releases).
+     * See also [Version
+     * List](/composer/docs/concepts/versioning/composer-versions).
+     * 
+ * + * string image_version = 1; + * + * @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 + airflowConfigOverrides_; + + private com.google.protobuf.MapField + internalGetAirflowConfigOverrides() { + if (airflowConfigOverrides_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + } + return airflowConfigOverrides_; + } + + private com.google.protobuf.MapField + internalGetMutableAirflowConfigOverrides() { + onChanged(); + ; + if (airflowConfigOverrides_ == null) { + airflowConfigOverrides_ = + com.google.protobuf.MapField.newMapField( + AirflowConfigOverridesDefaultEntryHolder.defaultEntry); + } + if (!airflowConfigOverrides_.isMutable()) { + airflowConfigOverrides_ = airflowConfigOverrides_.copy(); + } + return airflowConfigOverrides_; + } + + public int getAirflowConfigOverridesCount() { + return internalGetAirflowConfigOverrides().getMap().size(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsAirflowConfigOverrides(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAirflowConfigOverrides().getMap().containsKey(key); + } + /** Use {@link #getAirflowConfigOverridesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getAirflowConfigOverrides() { + return getAirflowConfigOverridesMap(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getAirflowConfigOverridesMap() { + return internalGetAirflowConfigOverrides().getMap(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getAirflowConfigOverridesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAirflowConfigOverrides().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAirflowConfigOverrides() { + internalGetMutableAirflowConfigOverrides().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAirflowConfigOverrides(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAirflowConfigOverrides().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableAirflowConfigOverrides() { + return internalGetMutableAirflowConfigOverrides().getMutableMap(); + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAirflowConfigOverrides(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAirflowConfigOverrides().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Apache Airflow configuration properties to override.
+     * Property keys contain the section and property names, separated by a
+     * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+     * not contain hyphens ("-"), opening square brackets ("["),  or closing
+     * square brackets ("]"). The property name must not be empty and must not
+     * contain an equals sign ("=") or semicolon (";"). Section and property names
+     * must not contain a period ("."). Apache Airflow configuration property
+     * names must be written in
+     * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+     * contain any character, and can be written in any lower/upper case format.
+     * Certain Apache Airflow configuration property values are
+     * [blocked](/composer/docs/concepts/airflow-configurations),
+     * and cannot be overridden.
+     * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllAirflowConfigOverrides( + java.util.Map values) { + internalGetMutableAirflowConfigOverrides().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField pypiPackages_; + + private com.google.protobuf.MapField + internalGetPypiPackages() { + if (pypiPackages_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PypiPackagesDefaultEntryHolder.defaultEntry); + } + return pypiPackages_; + } + + private com.google.protobuf.MapField + internalGetMutablePypiPackages() { + onChanged(); + ; + if (pypiPackages_ == null) { + pypiPackages_ = + com.google.protobuf.MapField.newMapField(PypiPackagesDefaultEntryHolder.defaultEntry); + } + if (!pypiPackages_.isMutable()) { + pypiPackages_ = pypiPackages_.copy(); + } + return pypiPackages_; + } + + public int getPypiPackagesCount() { + return internalGetPypiPackages().getMap().size(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsPypiPackages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPypiPackages().getMap().containsKey(key); + } + /** Use {@link #getPypiPackagesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPypiPackages() { + return getPypiPackagesMap(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getPypiPackagesMap() { + return internalGetPypiPackages().getMap(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getPypiPackagesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPypiPackages().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPypiPackages() { + internalGetMutablePypiPackages().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removePypiPackages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiPackages().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePypiPackages() { + return internalGetMutablePypiPackages().getMutableMap(); + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putPypiPackages(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePypiPackages().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Custom Python Package Index (PyPI) packages to be installed in
+     * the environment.
+     * Keys refer to the lowercase package name such as "numpy"
+     * and values are the lowercase extras and version specifier such as
+     * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+     * package without pinning it to a version specifier, use the empty string as
+     * the value.
+     * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllPypiPackages(java.util.Map values) { + internalGetMutablePypiPackages().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField envVariables_; + + private com.google.protobuf.MapField + internalGetEnvVariables() { + if (envVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + EnvVariablesDefaultEntryHolder.defaultEntry); + } + return envVariables_; + } + + private com.google.protobuf.MapField + internalGetMutableEnvVariables() { + onChanged(); + ; + if (envVariables_ == null) { + envVariables_ = + com.google.protobuf.MapField.newMapField(EnvVariablesDefaultEntryHolder.defaultEntry); + } + if (!envVariables_.isMutable()) { + envVariables_ = envVariables_.copy(); + } + return envVariables_; + } + + public int getEnvVariablesCount() { + return internalGetEnvVariables().getMap().size(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetEnvVariables().getMap().containsKey(key); + } + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getEnvVariables() { + return getEnvVariablesMap(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map getEnvVariablesMap() { + return internalGetEnvVariables().getMap(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.lang.String getEnvVariablesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetEnvVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearEnvVariables() { + internalGetMutableEnvVariables().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeEnvVariables(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvVariables().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableEnvVariables() { + return internalGetMutableEnvVariables().getMutableMap(); + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putEnvVariables(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableEnvVariables().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Optional. Additional environment variables to provide to the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Environment variable names must match the regular expression
+     * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+     * software configuration overrides (they cannot match the regular expression
+     * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+     * following reserved names:
+     * * `AIRFLOW_HOME`
+     * * `C_FORCE_ROOT`
+     * * `CONTAINER_NAME`
+     * * `DAGS_FOLDER`
+     * * `GCP_PROJECT`
+     * * `GCS_BUCKET`
+     * * `GKE_CLUSTER_NAME`
+     * * `SQL_DATABASE`
+     * * `SQL_INSTANCE`
+     * * `SQL_PASSWORD`
+     * * `SQL_PROJECT`
+     * * `SQL_REGION`
+     * * `SQL_USER`
+     * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllEnvVariables(java.util.Map values) { + internalGetMutableEnvVariables().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object pythonVersion_ = ""; + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pythonVersion. + */ + public java.lang.String getPythonVersion() { + java.lang.Object ref = pythonVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pythonVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pythonVersion. + */ + public com.google.protobuf.ByteString getPythonVersionBytes() { + java.lang.Object ref = pythonVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pythonVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pythonVersion to set. + * @return This builder for chaining. + */ + public Builder setPythonVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pythonVersion_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPythonVersion() { + + pythonVersion_ = getDefaultInstance().getPythonVersion(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The major version of Python used to run the Apache Airflow
+     * scheduler, worker, and webserver processes.
+     * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+     * updated.
+     * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pythonVersion to set. + * @return This builder for chaining. + */ + public Builder setPythonVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pythonVersion_ = 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.orchestration.airflow.service.v1beta1.SoftwareConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.SoftwareConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/SoftwareConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/SoftwareConfigOrBuilder.java new file mode 100644 index 00000000..6e55798b --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/SoftwareConfigOrBuilder.java @@ -0,0 +1,481 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface SoftwareConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @return The imageVersion. + */ + java.lang.String getImageVersion(); + /** + * + * + *
+   * The version of the software running in the environment.
+   * This encapsulates both the version of Cloud Composer functionality and the
+   * version of Apache Airflow. It must match the regular expression
+   * `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`.
+   * When used as input, the server also checks if the provided version is
+   * supported and denies the request for an unsupported version.
+   * The Cloud Composer portion of the version is a
+   * [semantic version](https://semver.org) or `latest`. When the patch version
+   * is omitted, the current Cloud Composer patch version is selected.
+   * When `latest` is provided instead of an explicit version number,
+   * the server replaces `latest` with the current Cloud Composer version
+   * and stores that version number in the same field.
+   * The portion of the image version that follows *airflow-* is an
+   * official Apache Airflow repository
+   * [release name](https://github.com/apache/incubator-airflow/releases).
+   * See also [Version
+   * List](/composer/docs/concepts/versioning/composer-versions).
+   * 
+ * + * string image_version = 1; + * + * @return The bytes for imageVersion. + */ + com.google.protobuf.ByteString getImageVersionBytes(); + + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAirflowConfigOverridesCount(); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsAirflowConfigOverrides(java.lang.String key); + /** Use {@link #getAirflowConfigOverridesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getAirflowConfigOverrides(); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getAirflowConfigOverridesMap(); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAirflowConfigOverridesOrDefault( + java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Apache Airflow configuration properties to override.
+   * Property keys contain the section and property names, separated by a
+   * hyphen, for example "core-dags_are_paused_at_creation". Section names must
+   * not contain hyphens ("-"), opening square brackets ("["),  or closing
+   * square brackets ("]"). The property name must not be empty and must not
+   * contain an equals sign ("=") or semicolon (";"). Section and property names
+   * must not contain a period ("."). Apache Airflow configuration property
+   * names must be written in
+   * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can
+   * contain any character, and can be written in any lower/upper case format.
+   * Certain Apache Airflow configuration property values are
+   * [blocked](/composer/docs/concepts/airflow-configurations),
+   * and cannot be overridden.
+   * 
+ * + * + * map<string, string> airflow_config_overrides = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getAirflowConfigOverridesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPypiPackagesCount(); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsPypiPackages(java.lang.String key); + /** Use {@link #getPypiPackagesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPypiPackages(); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getPypiPackagesMap(); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getPypiPackagesOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Custom Python Package Index (PyPI) packages to be installed in
+   * the environment.
+   * Keys refer to the lowercase package name such as "numpy"
+   * and values are the lowercase extras and version specifier such as
+   * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a
+   * package without pinning it to a version specifier, use the empty string as
+   * the value.
+   * 
+ * + * map<string, string> pypi_packages = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getPypiPackagesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getEnvVariablesCount(); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsEnvVariables(java.lang.String key); + /** Use {@link #getEnvVariablesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getEnvVariables(); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map getEnvVariablesMap(); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getEnvVariablesOrDefault(java.lang.String key, java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Additional environment variables to provide to the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Environment variable names must match the regular expression
+   * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow
+   * software configuration overrides (they cannot match the regular expression
+   * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the
+   * following reserved names:
+   * * `AIRFLOW_HOME`
+   * * `C_FORCE_ROOT`
+   * * `CONTAINER_NAME`
+   * * `DAGS_FOLDER`
+   * * `GCP_PROJECT`
+   * * `GCS_BUCKET`
+   * * `GKE_CLUSTER_NAME`
+   * * `SQL_DATABASE`
+   * * `SQL_INSTANCE`
+   * * `SQL_PASSWORD`
+   * * `SQL_PROJECT`
+   * * `SQL_REGION`
+   * * `SQL_USER`
+   * 
+ * + * map<string, string> env_variables = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.lang.String getEnvVariablesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pythonVersion. + */ + java.lang.String getPythonVersion(); + /** + * + * + *
+   * Optional. The major version of Python used to run the Apache Airflow
+   * scheduler, worker, and webserver processes.
+   * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be
+   * updated.
+   * 
+ * + * string python_version = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pythonVersion. + */ + com.google.protobuf.ByteString getPythonVersionBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/UpdateEnvironmentRequest.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/UpdateEnvironmentRequest.java new file mode 100644 index 00000000..c76c239a --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/UpdateEnvironmentRequest.java @@ -0,0 +1,2686 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Update an environment.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} + */ +public final class UpdateEnvironmentRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + UpdateEnvironmentRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateEnvironmentRequest.newBuilder() to construct. + private UpdateEnvironmentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateEnvironmentRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateEnvironmentRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateEnvironmentRequest( + 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.orchestration.airflow.service.v1beta1.Environment.Builder + subBuilder = null; + if (environment_ != null) { + subBuilder = environment_.toBuilder(); + } + environment_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environment_); + environment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @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 ENVIRONMENT_FIELD_NUMBER = 1; + private com.google.cloud.orchestration.airflow.service.v1beta1.Environment environment_; + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + @java.lang.Override + public boolean hasEnvironment() { + return environment_ != null; + } + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + * + * @return The environment. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment() { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment.getDefaultInstance() + : environment_; + } + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + return getEnvironment(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * argparse, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.argparse". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and argparse will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field. * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current WebServerNetworkAccessControl.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * * `config.softwareConfig.imageVersion`
+   *     * Upgrade the version of the environment in-place. Refer to
+   *       `SoftwareConfig.image_version` for information on how to format the
+   *       new image version. Additionally, the new image version cannot effect
+   *       a version downgrade and must match the current image version's
+   *       Composer major version and Airflow major and minor versions. Consult
+   *       the [Cloud Composer Version
+   *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+   *       for valid values.
+   * * `config.softwareConfig.schedulerCount`
+   *     * Horizontally scale the number of schedulers in Airflow. A positive
+   *       integer not greater than the number of nodes must be provided in the
+   *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+   *     * Cloud SQL machine type used by Airflow database.
+   *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+   *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+   *     * Machine type on which Airflow web server is running.
+   *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+   *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+   *     * Maintenance window during which Cloud Composer components may be
+   *       under maintenance.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * argparse, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.argparse". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and argparse will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field. * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current WebServerNetworkAccessControl.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * * `config.softwareConfig.imageVersion`
+   *     * Upgrade the version of the environment in-place. Refer to
+   *       `SoftwareConfig.image_version` for information on how to format the
+   *       new image version. Additionally, the new image version cannot effect
+   *       a version downgrade and must match the current image version's
+   *       Composer major version and Airflow major and minor versions. Consult
+   *       the [Cloud Composer Version
+   *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+   *       for valid values.
+   * * `config.softwareConfig.schedulerCount`
+   *     * Horizontally scale the number of schedulers in Airflow. A positive
+   *       integer not greater than the number of nodes must be provided in the
+   *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+   *     * Cloud SQL machine type used by Airflow database.
+   *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+   *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+   *     * Machine type on which Airflow web server is running.
+   *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+   *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+   *     * Maintenance window during which Cloud Composer components may be
+   *       under maintenance.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * argparse, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.argparse". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and argparse will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field. * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current WebServerNetworkAccessControl.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * * `config.softwareConfig.imageVersion`
+   *     * Upgrade the version of the environment in-place. Refer to
+   *       `SoftwareConfig.image_version` for information on how to format the
+   *       new image version. Additionally, the new image version cannot effect
+   *       a version downgrade and must match the current image version's
+   *       Composer major version and Airflow major and minor versions. Consult
+   *       the [Cloud Composer Version
+   *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+   *       for valid values.
+   * * `config.softwareConfig.schedulerCount`
+   *     * Horizontally scale the number of schedulers in Airflow. A positive
+   *       integer not greater than the number of nodes must be provided in the
+   *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+   *     * Cloud SQL machine type used by Airflow database.
+   *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+   *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+   *     * Machine type on which Airflow web server is running.
+   *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+   *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+   *     * Maintenance window during which Cloud Composer components may be
+   *       under maintenance.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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 (environment_ != null) { + output.writeMessage(1, getEnvironment()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (environment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEnvironment()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest other = + (com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasEnvironment() != other.hasEnvironment()) return false; + if (hasEnvironment()) { + if (!getEnvironment().equals(other.getEnvironment())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasEnvironment()) { + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().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.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Update an environment.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.class, + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (environmentBuilder_ == null) { + environment_ = null; + } else { + environment_ = null; + environmentBuilder_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_UpdateEnvironmentRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest build() { + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest result = + new com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(this); + result.name_ = name_; + if (environmentBuilder_ == null) { + result.environment_ = environment_; + } else { + result.environment_ = environmentBuilder_.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.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasEnvironment()) { + mergeEnvironment(other.getEnvironment()); + } + 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.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The relative resource name of the environment to update, in the form:
+     * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+     * 
+ * + * string name = 2; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.Environment environment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + environmentBuilder_; + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + public boolean hasEnvironment() { + return environmentBuilder_ != null || environment_ != null; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + * + * @return The environment. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment() { + if (environmentBuilder_ == null) { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance() + : environment_; + } else { + return environmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environment_ = value; + onChanged(); + } else { + environmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + public Builder setEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + builderForValue) { + if (environmentBuilder_ == null) { + environment_ = builderForValue.build(); + onChanged(); + } else { + environmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + public Builder mergeEnvironment( + com.google.cloud.orchestration.airflow.service.v1beta1.Environment value) { + if (environmentBuilder_ == null) { + if (environment_ != null) { + environment_ = + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.newBuilder( + environment_) + .mergeFrom(value) + .buildPartial(); + } else { + environment_ = value; + } + onChanged(); + } else { + environmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + public Builder clearEnvironment() { + if (environmentBuilder_ == null) { + environment_ = null; + onChanged(); + } else { + environment_ = null; + environmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder + getEnvironmentBuilder() { + + onChanged(); + return getEnvironmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentOrBuilder() { + if (environmentBuilder_ != null) { + return environmentBuilder_.getMessageOrBuilder(); + } else { + return environment_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.Environment + .getDefaultInstance() + : environment_; + } + } + /** + * + * + *
+     * A patch environment. Fields specified by the `updateMask` will be copied
+     * from the patch environment into the environment under update.
+     * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder> + getEnvironmentFieldBuilder() { + if (environmentBuilder_ == null) { + environmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.Environment, + com.google.cloud.orchestration.airflow.service.v1beta1.Environment.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder>( + getEnvironment(), getParentForChildren(), isClean()); + environment_ = null; + } + return environmentBuilder_; + } + + 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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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. A comma-separated list of paths, relative to `Environment`, of
+     * fields to update.
+     * For example, to set the version of scikit-learn to install in the
+     * environment to 0.19.0 and to remove an existing installation of
+     * argparse, the `updateMask` parameter would include the following two
+     * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+     * "config.softwareConfig.pypiPackages.argparse". The included patch
+     * environment would specify the scikit-learn version as follows:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "scikit-learn":"==0.19.0"
+     *           }
+     *         }
+     *       }
+     *     }
+     * Note that in the above example, any existing PyPI packages
+     * other than scikit-learn and argparse will be unaffected.
+     * Only one update type may be included in a single request's `updateMask`.
+     * For example, one cannot update both the PyPI packages and
+     * labels in the same request. However, it is possible to update multiple
+     * members of a map field simultaneously in the same request. For example,
+     * to set the labels "label1" and "label2" while clearing "label3" (assuming
+     * it already exists), one can
+     * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+     * and populate the patch environment as follows:
+     *     {
+     *       "labels":{
+     *         "label1":"new-label1-value"
+     *         "label2":"new-label2-value"
+     *       }
+     *     }
+     * Note that in the above example, any existing labels that are not
+     * included in the `updateMask` will be unaffected.
+     * It is also possible to replace an entire map field by providing the
+     * map field's path in the `updateMask`. The new value of the field will
+     * be that which is provided in the patch environment. For example, to
+     * delete all pre-existing user-specified PyPI packages and
+     * install botocore at version 1.7.14, the `updateMask` would contain
+     * the path "config.softwareConfig.pypiPackages", and
+     * the patch environment would be the following:
+     *     {
+     *       "config":{
+     *         "softwareConfig":{
+     *           "pypiPackages":{
+     *             "botocore":"==1.7.14"
+     *           }
+     *         }
+     *       }
+     *     }
+     * **Note:** Only the following fields can be updated:
+     * * `config.softwareConfig.pypiPackages`
+     *     * Replace all custom custom PyPI packages. If a replacement
+     *       package map is not included in `environment`, all custom
+     *       PyPI packages are cleared. It is an error to provide both
+     *       this mask and a mask specifying an individual package.
+     * * `config.softwareConfig.pypiPackages.`packagename
+     *     * Update the custom PyPI package *packagename*,
+     *       preserving other packages. To delete the package, include it in
+     *       `updateMask`, and omit the mapping for it in
+     *       `environment.config.softwareConfig.pypiPackages`. It is an error
+     *       to provide both a mask of this form and the
+     *       `config.softwareConfig.pypiPackages` mask.
+     * * `labels`
+     *     * Replace all environment labels. If a replacement labels map is not
+     *       included in `environment`, all labels are cleared. It is an error to
+     *       provide both this mask and a mask specifying one or more individual
+     *       labels.
+     * * `labels.`labelName
+     *     * Set the label named *labelName*, while preserving other
+     *       labels. To delete the label, include it in `updateMask` and omit its
+     *       mapping in `environment.labels`. It is an error to provide both a
+     *       mask of this form and the `labels` mask.
+     * * `config.nodeCount`
+     *     * Horizontally scale the number of nodes in the environment. An integer
+     *       greater than or equal to 3 must be provided in the `config.nodeCount`
+     *       field. * `config.webServerNetworkAccessControl`
+     *     * Replace the environment's current WebServerNetworkAccessControl.
+     * * `config.softwareConfig.airflowConfigOverrides`
+     *     * Replace all Apache Airflow config overrides. If a replacement config
+     *       overrides map is not included in `environment`, all config overrides
+     *       are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual config overrides.
+     * * `config.softwareConfig.airflowConfigOverrides.`section-name
+     *     * Override the Apache Airflow config property *name* in the
+     *       section named *section*, preserving other properties. To
+     *       delete the property override, include it in `updateMask` and omit its
+     *       mapping in
+     *       `environment.config.softwareConfig.airflowConfigOverrides`.
+     *       It is an error to provide both a mask of this form and the
+     *       `config.softwareConfig.airflowConfigOverrides` mask.
+     * * `config.softwareConfig.envVariables`
+     *     * Replace all environment variables. If a replacement environment
+     *       variable map is not included in `environment`, all custom environment
+     *       variables  are cleared.
+     *       It is an error to provide both this mask and a mask specifying one or
+     *       more individual environment variables.
+     * * `config.softwareConfig.imageVersion`
+     *     * Upgrade the version of the environment in-place. Refer to
+     *       `SoftwareConfig.image_version` for information on how to format the
+     *       new image version. Additionally, the new image version cannot effect
+     *       a version downgrade and must match the current image version's
+     *       Composer major version and Airflow major and minor versions. Consult
+     *       the [Cloud Composer Version
+     *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+     *       for valid values.
+     * * `config.softwareConfig.schedulerCount`
+     *     * Horizontally scale the number of schedulers in Airflow. A positive
+     *       integer not greater than the number of nodes must be provided in the
+     *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+     *     * Cloud SQL machine type used by Airflow database.
+     *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+     *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+     *     * Machine type on which Airflow web server is running.
+     *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+     *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+     *     * Maintenance window during which Cloud Composer components may be
+     *       under maintenance.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.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.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .UpdateEnvironmentRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateEnvironmentRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateEnvironmentRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/UpdateEnvironmentRequestOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/UpdateEnvironmentRequestOrBuilder.java new file mode 100644 index 00000000..d9cebf31 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/UpdateEnvironmentRequestOrBuilder.java @@ -0,0 +1,486 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface UpdateEnvironmentRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The relative resource name of the environment to update, in the form:
+   * "projects/{projectId}/locations/{locationId}/environments/{environmentId}"
+   * 
+ * + * string name = 2; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + * + * @return Whether the environment field is set. + */ + boolean hasEnvironment(); + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + * + * @return The environment. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.Environment getEnvironment(); + /** + * + * + *
+   * A patch environment. Fields specified by the `updateMask` will be copied
+   * from the patch environment into the environment under update.
+   * 
+ * + * .google.cloud.orchestration.airflow.service.v1beta1.Environment environment = 1; + */ + com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentOrBuilder + getEnvironmentOrBuilder(); + + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * argparse, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.argparse". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and argparse will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field. * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current WebServerNetworkAccessControl.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * * `config.softwareConfig.imageVersion`
+   *     * Upgrade the version of the environment in-place. Refer to
+   *       `SoftwareConfig.image_version` for information on how to format the
+   *       new image version. Additionally, the new image version cannot effect
+   *       a version downgrade and must match the current image version's
+   *       Composer major version and Airflow major and minor versions. Consult
+   *       the [Cloud Composer Version
+   *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+   *       for valid values.
+   * * `config.softwareConfig.schedulerCount`
+   *     * Horizontally scale the number of schedulers in Airflow. A positive
+   *       integer not greater than the number of nodes must be provided in the
+   *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+   *     * Cloud SQL machine type used by Airflow database.
+   *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+   *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+   *     * Machine type on which Airflow web server is running.
+   *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+   *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+   *     * Maintenance window during which Cloud Composer components may be
+   *       under maintenance.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * argparse, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.argparse". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and argparse will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field. * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current WebServerNetworkAccessControl.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * * `config.softwareConfig.imageVersion`
+   *     * Upgrade the version of the environment in-place. Refer to
+   *       `SoftwareConfig.image_version` for information on how to format the
+   *       new image version. Additionally, the new image version cannot effect
+   *       a version downgrade and must match the current image version's
+   *       Composer major version and Airflow major and minor versions. Consult
+   *       the [Cloud Composer Version
+   *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+   *       for valid values.
+   * * `config.softwareConfig.schedulerCount`
+   *     * Horizontally scale the number of schedulers in Airflow. A positive
+   *       integer not greater than the number of nodes must be provided in the
+   *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+   *     * Cloud SQL machine type used by Airflow database.
+   *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+   *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+   *     * Machine type on which Airflow web server is running.
+   *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+   *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+   *     * Maintenance window during which Cloud Composer components may be
+   *       under maintenance.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. A comma-separated list of paths, relative to `Environment`, of
+   * fields to update.
+   * For example, to set the version of scikit-learn to install in the
+   * environment to 0.19.0 and to remove an existing installation of
+   * argparse, the `updateMask` parameter would include the following two
+   * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and
+   * "config.softwareConfig.pypiPackages.argparse". The included patch
+   * environment would specify the scikit-learn version as follows:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "scikit-learn":"==0.19.0"
+   *           }
+   *         }
+   *       }
+   *     }
+   * Note that in the above example, any existing PyPI packages
+   * other than scikit-learn and argparse will be unaffected.
+   * Only one update type may be included in a single request's `updateMask`.
+   * For example, one cannot update both the PyPI packages and
+   * labels in the same request. However, it is possible to update multiple
+   * members of a map field simultaneously in the same request. For example,
+   * to set the labels "label1" and "label2" while clearing "label3" (assuming
+   * it already exists), one can
+   * provide the paths "labels.label1", "labels.label2", and "labels.label3"
+   * and populate the patch environment as follows:
+   *     {
+   *       "labels":{
+   *         "label1":"new-label1-value"
+   *         "label2":"new-label2-value"
+   *       }
+   *     }
+   * Note that in the above example, any existing labels that are not
+   * included in the `updateMask` will be unaffected.
+   * It is also possible to replace an entire map field by providing the
+   * map field's path in the `updateMask`. The new value of the field will
+   * be that which is provided in the patch environment. For example, to
+   * delete all pre-existing user-specified PyPI packages and
+   * install botocore at version 1.7.14, the `updateMask` would contain
+   * the path "config.softwareConfig.pypiPackages", and
+   * the patch environment would be the following:
+   *     {
+   *       "config":{
+   *         "softwareConfig":{
+   *           "pypiPackages":{
+   *             "botocore":"==1.7.14"
+   *           }
+   *         }
+   *       }
+   *     }
+   * **Note:** Only the following fields can be updated:
+   * * `config.softwareConfig.pypiPackages`
+   *     * Replace all custom custom PyPI packages. If a replacement
+   *       package map is not included in `environment`, all custom
+   *       PyPI packages are cleared. It is an error to provide both
+   *       this mask and a mask specifying an individual package.
+   * * `config.softwareConfig.pypiPackages.`packagename
+   *     * Update the custom PyPI package *packagename*,
+   *       preserving other packages. To delete the package, include it in
+   *       `updateMask`, and omit the mapping for it in
+   *       `environment.config.softwareConfig.pypiPackages`. It is an error
+   *       to provide both a mask of this form and the
+   *       `config.softwareConfig.pypiPackages` mask.
+   * * `labels`
+   *     * Replace all environment labels. If a replacement labels map is not
+   *       included in `environment`, all labels are cleared. It is an error to
+   *       provide both this mask and a mask specifying one or more individual
+   *       labels.
+   * * `labels.`labelName
+   *     * Set the label named *labelName*, while preserving other
+   *       labels. To delete the label, include it in `updateMask` and omit its
+   *       mapping in `environment.labels`. It is an error to provide both a
+   *       mask of this form and the `labels` mask.
+   * * `config.nodeCount`
+   *     * Horizontally scale the number of nodes in the environment. An integer
+   *       greater than or equal to 3 must be provided in the `config.nodeCount`
+   *       field. * `config.webServerNetworkAccessControl`
+   *     * Replace the environment's current WebServerNetworkAccessControl.
+   * * `config.softwareConfig.airflowConfigOverrides`
+   *     * Replace all Apache Airflow config overrides. If a replacement config
+   *       overrides map is not included in `environment`, all config overrides
+   *       are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual config overrides.
+   * * `config.softwareConfig.airflowConfigOverrides.`section-name
+   *     * Override the Apache Airflow config property *name* in the
+   *       section named *section*, preserving other properties. To
+   *       delete the property override, include it in `updateMask` and omit its
+   *       mapping in
+   *       `environment.config.softwareConfig.airflowConfigOverrides`.
+   *       It is an error to provide both a mask of this form and the
+   *       `config.softwareConfig.airflowConfigOverrides` mask.
+   * * `config.softwareConfig.envVariables`
+   *     * Replace all environment variables. If a replacement environment
+   *       variable map is not included in `environment`, all custom environment
+   *       variables  are cleared.
+   *       It is an error to provide both this mask and a mask specifying one or
+   *       more individual environment variables.
+   * * `config.softwareConfig.imageVersion`
+   *     * Upgrade the version of the environment in-place. Refer to
+   *       `SoftwareConfig.image_version` for information on how to format the
+   *       new image version. Additionally, the new image version cannot effect
+   *       a version downgrade and must match the current image version's
+   *       Composer major version and Airflow major and minor versions. Consult
+   *       the [Cloud Composer Version
+   *       List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions)
+   *       for valid values.
+   * * `config.softwareConfig.schedulerCount`
+   *     * Horizontally scale the number of schedulers in Airflow. A positive
+   *       integer not greater than the number of nodes must be provided in the
+   *       `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType`
+   *     * Cloud SQL machine type used by Airflow database.
+   *       It has to be one of: db-n1-standard-2, db-n1-standard-4,
+   *       db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType`
+   *     * Machine type on which Airflow web server is running.
+   *       It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4
+   *       or composer-n1-webserver-8. * `config.maintenanceWindow`
+   *     * Maintenance window during which Cloud Composer components may be
+   *       under maintenance.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerConfig.java new file mode 100644 index 00000000..70386ec9 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerConfig.java @@ -0,0 +1,684 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The configuration settings for the Airflow web server App Engine instance.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} + */ +public final class WebServerConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + WebServerConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebServerConfig.newBuilder() to construct. + private WebServerConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WebServerConfig() { + machineType_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WebServerConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebServerConfig( + 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(); + + machineType_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder.class); + } + + public static final int MACHINE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object machineType_; + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + @java.lang.Override + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMachineTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, machineType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMachineTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, machineType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) obj; + + if (!getMachineType().equals(other.getMachineType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMachineType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration settings for the Airflow web server App Engine instance.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + machineType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(this); + result.machineType_ = machineType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + .getDefaultInstance()) return this; + if (!other.getMachineType().isEmpty()) { + machineType_ = other.machineType_; + 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.orchestration.airflow.service.v1beta1.WebServerConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object machineType_ = ""; + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + public java.lang.String getMachineType() { + java.lang.Object ref = machineType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + machineType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + public com.google.protobuf.ByteString getMachineTypeBytes() { + java.lang.Object ref = machineType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + machineType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + machineType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMachineType() { + + machineType_ = getDefaultInstance().getMachineType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Machine type on which Airflow web server is running.
+     * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+     * composer-n1-webserver-8.
+     * If not specified, composer-n1-webserver-2 will be used.
+     * Value custom is returned only in response, if Airflow web server parameters
+     * were manually changed to a non-standard values.
+     * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for machineType to set. + * @return This builder for chaining. + */ + public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + machineType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebServerConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerConfigOrBuilder.java new file mode 100644 index 00000000..35a3328d --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerConfigOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface WebServerConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The machineType. + */ + java.lang.String getMachineType(); + /** + * + * + *
+   * Optional. Machine type on which Airflow web server is running.
+   * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or
+   * composer-n1-webserver-8.
+   * If not specified, composer-n1-webserver-2 will be used.
+   * Value custom is returned only in response, if Airflow web server parameters
+   * were manually changed to a non-standard values.
+   * 
+ * + * string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for machineType. + */ + com.google.protobuf.ByteString getMachineTypeBytes(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerNetworkAccessControl.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerNetworkAccessControl.java new file mode 100644 index 00000000..ff10e33c --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerNetworkAccessControl.java @@ -0,0 +1,2095 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * Network-level access control policy for the Airflow web server.
+ * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} + */ +public final class WebServerNetworkAccessControl extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + WebServerNetworkAccessControlOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebServerNetworkAccessControl.newBuilder() to construct. + private WebServerNetworkAccessControl(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WebServerNetworkAccessControl() { + allowedIpRanges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WebServerNetworkAccessControl(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebServerNetworkAccessControl( + 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)) { + allowedIpRanges_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange>(); + mutable_bitField0_ |= 0x00000001; + } + allowedIpRanges_.add( + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange.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)) { + allowedIpRanges_ = java.util.Collections.unmodifiableList(allowedIpRanges_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder.class); + } + + public interface AllowedIpRangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + java.lang.String getValue(); + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + com.google.protobuf.ByteString getValueBytes(); + + /** + * + * + *
+     * Optional. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Optional. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + } + /** + * + * + *
+   * Allowed IP range with user-provided description.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} + */ + public static final class AllowedIpRange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + AllowedIpRangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use AllowedIpRange.newBuilder() to construct. + private AllowedIpRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AllowedIpRange() { + value_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AllowedIpRange(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AllowedIpRange( + 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(); + + value_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The value. + */ + @java.lang.Override + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } + } + /** + * + * + *
+     * IP address or range, defined using CIDR notation, of requests that this
+     * rule applies to.
+     * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+     *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+     * IP range prefixes should be properly truncated. For example,
+     * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+     * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+     * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Optional. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+     * 
+ * + * string description = 2 [(.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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange) + obj; + + if (!getValue().equals(other.getValue())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Allowed IP range with user-provided description.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_AllowedIpRange_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + result = + new com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange(this); + result.value_ = value_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance()) return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + 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.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object value_ = ""; + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @return The bytes for value. + */ + public com.google.protobuf.ByteString getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * + * + *
+       * IP address or range, defined using CIDR notation, of requests that this
+       * rule applies to.
+       * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32`
+       *           or `2001:0db8:0000:0042:0000:8a2e:0370:7334`.
+       * IP range prefixes should be properly truncated. For example,
+       * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6,
+       * `2001:db8::1/32` should be truncated to `2001:db8::/32`.
+       * 
+ * + * string value = 1; + * + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * Optional. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. User-provided description. It must contain at most 300 characters.
+       * 
+ * + * string description = 2 [(.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; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AllowedIpRange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AllowedIpRange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ALLOWED_IP_RANGES_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange> + allowedIpRanges_; + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange> + getAllowedIpRangesList() { + return allowedIpRanges_; + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesOrBuilderList() { + return allowedIpRanges_; + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public int getAllowedIpRangesCount() { + return allowedIpRanges_.size(); + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + getAllowedIpRanges(int index) { + return allowedIpRanges_.get(index); + } + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder + getAllowedIpRangesOrBuilder(int index) { + return allowedIpRanges_.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 < allowedIpRanges_.size(); i++) { + output.writeMessage(1, allowedIpRanges_.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 < allowedIpRanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, allowedIpRanges_.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.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) obj; + + if (!getAllowedIpRangesList().equals(other.getAllowedIpRangesList())) return false; + if (!unknownFields.equals(other.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 (getAllowedIpRangesCount() > 0) { + hash = (37 * hash) + ALLOWED_IP_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIpRangesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Network-level access control policy for the Airflow web server.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedIpRangesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (allowedIpRangesBuilder_ == null) { + allowedIpRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedIpRangesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WebServerNetworkAccessControl_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl result = + new com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl( + this); + int from_bitField0_ = bitField0_; + if (allowedIpRangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedIpRanges_ = java.util.Collections.unmodifiableList(allowedIpRanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedIpRanges_ = allowedIpRanges_; + } else { + result.allowedIpRanges_ = allowedIpRangesBuilder_.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.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .getDefaultInstance()) return this; + if (allowedIpRangesBuilder_ == null) { + if (!other.allowedIpRanges_.isEmpty()) { + if (allowedIpRanges_.isEmpty()) { + allowedIpRanges_ = other.allowedIpRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.addAll(other.allowedIpRanges_); + } + onChanged(); + } + } else { + if (!other.allowedIpRanges_.isEmpty()) { + if (allowedIpRangesBuilder_.isEmpty()) { + allowedIpRangesBuilder_.dispose(); + allowedIpRangesBuilder_ = null; + allowedIpRanges_ = other.allowedIpRanges_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedIpRangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedIpRangesFieldBuilder() + : null; + } else { + allowedIpRangesBuilder_.addAllMessages(other.allowedIpRanges_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange> + allowedIpRanges_ = java.util.Collections.emptyList(); + + private void ensureAllowedIpRangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedIpRanges_ = + new java.util.ArrayList< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange>(allowedIpRanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + allowedIpRangesBuilder_; + + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange> + getAllowedIpRangesList() { + if (allowedIpRangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedIpRanges_); + } else { + return allowedIpRangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public int getAllowedIpRangesCount() { + if (allowedIpRangesBuilder_ == null) { + return allowedIpRanges_.size(); + } else { + return allowedIpRangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + getAllowedIpRanges(int index) { + if (allowedIpRangesBuilder_ == null) { + return allowedIpRanges_.get(index); + } else { + return allowedIpRangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder setAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + value) { + if (allowedIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.set(index, value); + onChanged(); + } else { + allowedIpRangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder setAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + builderForValue) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedIpRangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + value) { + if (allowedIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(value); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + value) { + if (allowedIpRangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(index, value); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + builderForValue) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(builderForValue.build()); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllowedIpRanges( + int index, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + builderForValue) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedIpRangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder addAllAllowedIpRanges( + java.lang.Iterable< + ? extends + com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl.AllowedIpRange> + values) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedIpRanges_); + onChanged(); + } else { + allowedIpRangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder clearAllowedIpRanges() { + if (allowedIpRangesBuilder_ == null) { + allowedIpRanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedIpRangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public Builder removeAllowedIpRanges(int index) { + if (allowedIpRangesBuilder_ == null) { + ensureAllowedIpRangesIsMutable(); + allowedIpRanges_.remove(index); + onChanged(); + } else { + allowedIpRangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + getAllowedIpRangesBuilder(int index) { + return getAllowedIpRangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder + getAllowedIpRangesOrBuilder(int index) { + if (allowedIpRangesBuilder_ == null) { + return allowedIpRanges_.get(index); + } else { + return allowedIpRangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesOrBuilderList() { + if (allowedIpRangesBuilder_ != null) { + return allowedIpRangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedIpRanges_); + } + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + addAllowedIpRangesBuilder() { + return getAllowedIpRangesFieldBuilder() + .addBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder + addAllowedIpRangesBuilder(int index) { + return getAllowedIpRangesFieldBuilder() + .addBuilder( + index, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.getDefaultInstance()); + } + /** + * + * + *
+     * A collection of allowed IP ranges with descriptions.
+     * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + public java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder> + getAllowedIpRangesBuilderList() { + return getAllowedIpRangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesFieldBuilder() { + if (allowedIpRangesBuilder_ == null) { + allowedIpRangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder>( + allowedIpRanges_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedIpRanges_ = null; + } + return allowedIpRangesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + private static final com.google.cloud.orchestration.airflow.service.v1beta1 + .WebServerNetworkAccessControl + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebServerNetworkAccessControl parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebServerNetworkAccessControl(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerNetworkAccessControlOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerNetworkAccessControlOrBuilder.java new file mode 100644 index 00000000..3400d7da --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WebServerNetworkAccessControlOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface WebServerNetworkAccessControlOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + java.util.List< + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange> + getAllowedIpRangesList(); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRange + getAllowedIpRanges(int index); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + int getAllowedIpRangesCount(); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder> + getAllowedIpRangesOrBuilderList(); + /** + * + * + *
+   * A collection of allowed IP ranges with descriptions.
+   * 
+ * + * + * repeated .google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + .AllowedIpRangeOrBuilder + getAllowedIpRangesOrBuilder(int index); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WorkloadsConfig.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WorkloadsConfig.java new file mode 100644 index 00000000..2f0a9013 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WorkloadsConfig.java @@ -0,0 +1,4241 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +/** + * + * + *
+ * The Kubernetes workloads configuration for GKE cluster associated with the
+ * Cloud Composer environment. Supported for Cloud Composer environments in
+ * versions composer-2.*.*-airflow-*.*.* and newer.
+ * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} + */ +public final class WorkloadsConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + WorkloadsConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkloadsConfig.newBuilder() to construct. + private WorkloadsConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WorkloadsConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WorkloadsConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WorkloadsConfig( + 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.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.Builder + subBuilder = null; + if (scheduler_ != null) { + subBuilder = scheduler_.toBuilder(); + } + scheduler_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduler_); + scheduler_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.Builder + subBuilder = null; + if (webServer_ != null) { + subBuilder = webServer_.toBuilder(); + } + webServer_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webServer_); + webServer_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .Builder + subBuilder = null; + if (worker_ != null) { + subBuilder = worker_.toBuilder(); + } + worker_ = + input.readMessage( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(worker_); + worker_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder.class); + } + + public interface SchedulerResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. CPU request and limit for a single Airflow scheduler replica.
+     * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + float getCpu(); + + /** + * + * + *
+     * Optional. Memory (GB) request and limit for a single Airflow scheduler replica.
+     * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + float getMemoryGb(); + + /** + * + * + *
+     * Optional. Storage (GB) request and limit for a single Airflow scheduler replica.
+     * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + float getStorageGb(); + + /** + * + * + *
+     * Optional. The number of schedulers.
+     * 
+ * + * int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count. + */ + int getCount(); + } + /** + * + * + *
+   * Configuration for resources used by Airflow schedulers.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} + */ + public static final class SchedulerResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + SchedulerResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SchedulerResource.newBuilder() to construct. + private SchedulerResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SchedulerResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SchedulerResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SchedulerResource( + 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 13: + { + cpu_ = input.readFloat(); + break; + } + case 21: + { + memoryGb_ = input.readFloat(); + break; + } + case 29: + { + storageGb_ = input.readFloat(); + break; + } + case 32: + { + count_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.Builder.class); + } + + public static final int CPU_FIELD_NUMBER = 1; + private float cpu_; + /** + * + * + *
+     * Optional. CPU request and limit for a single Airflow scheduler replica.
+     * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + @java.lang.Override + public float getCpu() { + return cpu_; + } + + public static final int MEMORY_GB_FIELD_NUMBER = 2; + private float memoryGb_; + /** + * + * + *
+     * Optional. Memory (GB) request and limit for a single Airflow scheduler replica.
+     * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + @java.lang.Override + public float getMemoryGb() { + return memoryGb_; + } + + public static final int STORAGE_GB_FIELD_NUMBER = 3; + private float storageGb_; + /** + * + * + *
+     * Optional. Storage (GB) request and limit for a single Airflow scheduler replica.
+     * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + @java.lang.Override + public float getStorageGb() { + return storageGb_; + } + + public static final int COUNT_FIELD_NUMBER = 4; + private int count_; + /** + * + * + *
+     * Optional. The number of schedulers.
+     * 
+ * + * int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (cpu_ != 0F) { + output.writeFloat(1, cpu_); + } + if (memoryGb_ != 0F) { + output.writeFloat(2, memoryGb_); + } + if (storageGb_ != 0F) { + output.writeFloat(3, storageGb_); + } + if (count_ != 0) { + output.writeInt32(4, count_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cpu_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, cpu_); + } + if (memoryGb_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, memoryGb_); + } + if (storageGb_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, storageGb_); + } + if (count_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, count_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource) + obj; + + if (java.lang.Float.floatToIntBits(getCpu()) + != java.lang.Float.floatToIntBits(other.getCpu())) return false; + if (java.lang.Float.floatToIntBits(getMemoryGb()) + != java.lang.Float.floatToIntBits(other.getMemoryGb())) return false; + if (java.lang.Float.floatToIntBits(getStorageGb()) + != java.lang.Float.floatToIntBits(other.getStorageGb())) return false; + if (getCount() != other.getCount()) return false; + if (!unknownFields.equals(other.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) + CPU_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCpu()); + hash = (37 * hash) + MEMORY_GB_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMemoryGb()); + hash = (37 * hash) + STORAGE_GB_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getStorageGb()); + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 resources used by Airflow schedulers.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cpu_ = 0F; + + memoryGb_ = 0F; + + storageGb_ = 0F; + + count_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_SchedulerResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + result = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource(this); + result.cpu_ = cpu_; + result.memoryGb_ = memoryGb_; + result.storageGb_ = storageGb_; + result.count_ = count_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.getDefaultInstance()) return this; + if (other.getCpu() != 0F) { + setCpu(other.getCpu()); + } + if (other.getMemoryGb() != 0F) { + setMemoryGb(other.getMemoryGb()); + } + if (other.getStorageGb() != 0F) { + setStorageGb(other.getStorageGb()); + } + if (other.getCount() != 0) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float cpu_; + /** + * + * + *
+       * Optional. CPU request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + @java.lang.Override + public float getCpu() { + return cpu_; + } + /** + * + * + *
+       * Optional. CPU request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cpu to set. + * @return This builder for chaining. + */ + public Builder setCpu(float value) { + + cpu_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. CPU request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCpu() { + + cpu_ = 0F; + onChanged(); + return this; + } + + private float memoryGb_; + /** + * + * + *
+       * Optional. Memory (GB) request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + @java.lang.Override + public float getMemoryGb() { + return memoryGb_; + } + /** + * + * + *
+       * Optional. Memory (GB) request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The memoryGb to set. + * @return This builder for chaining. + */ + public Builder setMemoryGb(float value) { + + memoryGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Memory (GB) request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMemoryGb() { + + memoryGb_ = 0F; + onChanged(); + return this; + } + + private float storageGb_; + /** + * + * + *
+       * Optional. Storage (GB) request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + @java.lang.Override + public float getStorageGb() { + return storageGb_; + } + /** + * + * + *
+       * Optional. Storage (GB) request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The storageGb to set. + * @return This builder for chaining. + */ + public Builder setStorageGb(float value) { + + storageGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Storage (GB) request and limit for a single Airflow scheduler replica.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearStorageGb() { + + storageGb_ = 0F; + onChanged(); + return this; + } + + private int count_; + /** + * + * + *
+       * Optional. The number of schedulers.
+       * 
+ * + * int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count. + */ + @java.lang.Override + public int getCount() { + return count_; + } + /** + * + * + *
+       * Optional. The number of schedulers.
+       * 
+ * + * int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(int value) { + + count_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The number of schedulers.
+       * 
+ * + * int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCount() { + + count_ = 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.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SchedulerResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SchedulerResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WebServerResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. CPU request and limit for Airflow web server.
+     * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + float getCpu(); + + /** + * + * + *
+     * Optional. Memory (GB) request and limit for Airflow web server.
+     * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + float getMemoryGb(); + + /** + * + * + *
+     * Optional. Storage (GB) request and limit for Airflow web server.
+     * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + float getStorageGb(); + } + /** + * + * + *
+   * Configuration for resources used by Airflow web server.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} + */ + public static final class WebServerResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + WebServerResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebServerResource.newBuilder() to construct. + private WebServerResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WebServerResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WebServerResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WebServerResource( + 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 13: + { + cpu_ = input.readFloat(); + break; + } + case 21: + { + memoryGb_ = input.readFloat(); + break; + } + case 29: + { + storageGb_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.Builder.class); + } + + public static final int CPU_FIELD_NUMBER = 1; + private float cpu_; + /** + * + * + *
+     * Optional. CPU request and limit for Airflow web server.
+     * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + @java.lang.Override + public float getCpu() { + return cpu_; + } + + public static final int MEMORY_GB_FIELD_NUMBER = 2; + private float memoryGb_; + /** + * + * + *
+     * Optional. Memory (GB) request and limit for Airflow web server.
+     * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + @java.lang.Override + public float getMemoryGb() { + return memoryGb_; + } + + public static final int STORAGE_GB_FIELD_NUMBER = 3; + private float storageGb_; + /** + * + * + *
+     * Optional. Storage (GB) request and limit for Airflow web server.
+     * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + @java.lang.Override + public float getStorageGb() { + return storageGb_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (cpu_ != 0F) { + output.writeFloat(1, cpu_); + } + if (memoryGb_ != 0F) { + output.writeFloat(2, memoryGb_); + } + if (storageGb_ != 0F) { + output.writeFloat(3, storageGb_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cpu_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, cpu_); + } + if (memoryGb_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, memoryGb_); + } + if (storageGb_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, storageGb_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource) + obj; + + if (java.lang.Float.floatToIntBits(getCpu()) + != java.lang.Float.floatToIntBits(other.getCpu())) return false; + if (java.lang.Float.floatToIntBits(getMemoryGb()) + != java.lang.Float.floatToIntBits(other.getMemoryGb())) return false; + if (java.lang.Float.floatToIntBits(getStorageGb()) + != java.lang.Float.floatToIntBits(other.getStorageGb())) return false; + if (!unknownFields.equals(other.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) + CPU_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCpu()); + hash = (37 * hash) + MEMORY_GB_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMemoryGb()); + hash = (37 * hash) + STORAGE_GB_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getStorageGb()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 resources used by Airflow web server.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cpu_ = 0F; + + memoryGb_ = 0F; + + storageGb_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WebServerResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + result = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource(this); + result.cpu_ = cpu_; + result.memoryGb_ = memoryGb_; + result.storageGb_ = storageGb_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.getDefaultInstance()) return this; + if (other.getCpu() != 0F) { + setCpu(other.getCpu()); + } + if (other.getMemoryGb() != 0F) { + setMemoryGb(other.getMemoryGb()); + } + if (other.getStorageGb() != 0F) { + setStorageGb(other.getStorageGb()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float cpu_; + /** + * + * + *
+       * Optional. CPU request and limit for Airflow web server.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + @java.lang.Override + public float getCpu() { + return cpu_; + } + /** + * + * + *
+       * Optional. CPU request and limit for Airflow web server.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cpu to set. + * @return This builder for chaining. + */ + public Builder setCpu(float value) { + + cpu_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. CPU request and limit for Airflow web server.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCpu() { + + cpu_ = 0F; + onChanged(); + return this; + } + + private float memoryGb_; + /** + * + * + *
+       * Optional. Memory (GB) request and limit for Airflow web server.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + @java.lang.Override + public float getMemoryGb() { + return memoryGb_; + } + /** + * + * + *
+       * Optional. Memory (GB) request and limit for Airflow web server.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The memoryGb to set. + * @return This builder for chaining. + */ + public Builder setMemoryGb(float value) { + + memoryGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Memory (GB) request and limit for Airflow web server.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMemoryGb() { + + memoryGb_ = 0F; + onChanged(); + return this; + } + + private float storageGb_; + /** + * + * + *
+       * Optional. Storage (GB) request and limit for Airflow web server.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + @java.lang.Override + public float getStorageGb() { + return storageGb_; + } + /** + * + * + *
+       * Optional. Storage (GB) request and limit for Airflow web server.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The storageGb to set. + * @return This builder for chaining. + */ + public Builder setStorageGb(float value) { + + storageGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Storage (GB) request and limit for Airflow web server.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearStorageGb() { + + storageGb_ = 0F; + 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.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebServerResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebServerResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WorkerResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. CPU request and limit for a single Airflow worker replica.
+     * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + float getCpu(); + + /** + * + * + *
+     * Optional. Memory (GB) request and limit for a single Airflow worker replica.
+     * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + float getMemoryGb(); + + /** + * + * + *
+     * Optional. Storage (GB) request and limit for a single Airflow worker replica.
+     * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + float getStorageGb(); + + /** + * + * + *
+     * Optional. Minimum number of workers for autoscaling.
+     * 
+ * + * int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minCount. + */ + int getMinCount(); + + /** + * + * + *
+     * Optional. Maximum number of workers for autoscaling.
+     * 
+ * + * int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxCount. + */ + int getMaxCount(); + } + /** + * + * + *
+   * Configuration for resources used by Airflow workers.
+   * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} + */ + public static final class WorkerResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + WorkerResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use WorkerResource.newBuilder() to construct. + private WorkerResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private WorkerResource() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new WorkerResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private WorkerResource( + 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 13: + { + cpu_ = input.readFloat(); + break; + } + case 21: + { + memoryGb_ = input.readFloat(); + break; + } + case 29: + { + storageGb_ = input.readFloat(); + break; + } + case 32: + { + minCount_ = input.readInt32(); + break; + } + case 40: + { + maxCount_ = 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.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .Builder.class); + } + + public static final int CPU_FIELD_NUMBER = 1; + private float cpu_; + /** + * + * + *
+     * Optional. CPU request and limit for a single Airflow worker replica.
+     * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + @java.lang.Override + public float getCpu() { + return cpu_; + } + + public static final int MEMORY_GB_FIELD_NUMBER = 2; + private float memoryGb_; + /** + * + * + *
+     * Optional. Memory (GB) request and limit for a single Airflow worker replica.
+     * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + @java.lang.Override + public float getMemoryGb() { + return memoryGb_; + } + + public static final int STORAGE_GB_FIELD_NUMBER = 3; + private float storageGb_; + /** + * + * + *
+     * Optional. Storage (GB) request and limit for a single Airflow worker replica.
+     * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + @java.lang.Override + public float getStorageGb() { + return storageGb_; + } + + public static final int MIN_COUNT_FIELD_NUMBER = 4; + private int minCount_; + /** + * + * + *
+     * Optional. Minimum number of workers for autoscaling.
+     * 
+ * + * int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minCount. + */ + @java.lang.Override + public int getMinCount() { + return minCount_; + } + + public static final int MAX_COUNT_FIELD_NUMBER = 5; + private int maxCount_; + /** + * + * + *
+     * Optional. Maximum number of workers for autoscaling.
+     * 
+ * + * int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (cpu_ != 0F) { + output.writeFloat(1, cpu_); + } + if (memoryGb_ != 0F) { + output.writeFloat(2, memoryGb_); + } + if (storageGb_ != 0F) { + output.writeFloat(3, storageGb_); + } + if (minCount_ != 0) { + output.writeInt32(4, minCount_); + } + if (maxCount_ != 0) { + output.writeInt32(5, maxCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cpu_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, cpu_); + } + if (memoryGb_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, memoryGb_); + } + if (storageGb_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, storageGb_); + } + if (minCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, minCount_); + } + if (maxCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, maxCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + obj; + + if (java.lang.Float.floatToIntBits(getCpu()) + != java.lang.Float.floatToIntBits(other.getCpu())) return false; + if (java.lang.Float.floatToIntBits(getMemoryGb()) + != java.lang.Float.floatToIntBits(other.getMemoryGb())) return false; + if (java.lang.Float.floatToIntBits(getStorageGb()) + != java.lang.Float.floatToIntBits(other.getStorageGb())) return false; + if (getMinCount() != other.getMinCount()) return false; + if (getMaxCount() != other.getMaxCount()) return false; + if (!unknownFields.equals(other.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) + CPU_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getCpu()); + hash = (37 * hash) + MEMORY_GB_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getMemoryGb()); + hash = (37 * hash) + STORAGE_GB_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getStorageGb()); + hash = (37 * hash) + MIN_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMinCount(); + hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 resources used by Airflow workers.
+     * 
+ * + * Protobuf type {@code + * google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + cpu_ = 0F; + + memoryGb_ = 0F; + + storageGb_ = 0F; + + minCount_ = 0; + + maxCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_WorkerResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + result = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource(this); + result.cpu_ = cpu_; + result.memoryGb_ = memoryGb_; + result.storageGb_ = storageGb_; + result.minCount_ = minCount_; + result.maxCount_ = maxCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .getDefaultInstance()) return this; + if (other.getCpu() != 0F) { + setCpu(other.getCpu()); + } + if (other.getMemoryGb() != 0F) { + setMemoryGb(other.getMemoryGb()); + } + if (other.getStorageGb() != 0F) { + setStorageGb(other.getStorageGb()); + } + if (other.getMinCount() != 0) { + setMinCount(other.getMinCount()); + } + if (other.getMaxCount() != 0) { + setMaxCount(other.getMaxCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float cpu_; + /** + * + * + *
+       * Optional. CPU request and limit for a single Airflow worker replica.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The cpu. + */ + @java.lang.Override + public float getCpu() { + return cpu_; + } + /** + * + * + *
+       * Optional. CPU request and limit for a single Airflow worker replica.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cpu to set. + * @return This builder for chaining. + */ + public Builder setCpu(float value) { + + cpu_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. CPU request and limit for a single Airflow worker replica.
+       * 
+ * + * float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCpu() { + + cpu_ = 0F; + onChanged(); + return this; + } + + private float memoryGb_; + /** + * + * + *
+       * Optional. Memory (GB) request and limit for a single Airflow worker replica.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The memoryGb. + */ + @java.lang.Override + public float getMemoryGb() { + return memoryGb_; + } + /** + * + * + *
+       * Optional. Memory (GB) request and limit for a single Airflow worker replica.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The memoryGb to set. + * @return This builder for chaining. + */ + public Builder setMemoryGb(float value) { + + memoryGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Memory (GB) request and limit for a single Airflow worker replica.
+       * 
+ * + * float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMemoryGb() { + + memoryGb_ = 0F; + onChanged(); + return this; + } + + private float storageGb_; + /** + * + * + *
+       * Optional. Storage (GB) request and limit for a single Airflow worker replica.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The storageGb. + */ + @java.lang.Override + public float getStorageGb() { + return storageGb_; + } + /** + * + * + *
+       * Optional. Storage (GB) request and limit for a single Airflow worker replica.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The storageGb to set. + * @return This builder for chaining. + */ + public Builder setStorageGb(float value) { + + storageGb_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Storage (GB) request and limit for a single Airflow worker replica.
+       * 
+ * + * float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearStorageGb() { + + storageGb_ = 0F; + onChanged(); + return this; + } + + private int minCount_; + /** + * + * + *
+       * Optional. Minimum number of workers for autoscaling.
+       * 
+ * + * int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minCount. + */ + @java.lang.Override + public int getMinCount() { + return minCount_; + } + /** + * + * + *
+       * Optional. Minimum number of workers for autoscaling.
+       * 
+ * + * int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minCount to set. + * @return This builder for chaining. + */ + public Builder setMinCount(int value) { + + minCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Minimum number of workers for autoscaling.
+       * 
+ * + * int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinCount() { + + minCount_ = 0; + onChanged(); + return this; + } + + private int maxCount_; + /** + * + * + *
+       * Optional. Maximum number of workers for autoscaling.
+       * 
+ * + * int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxCount. + */ + @java.lang.Override + public int getMaxCount() { + return maxCount_; + } + /** + * + * + *
+       * Optional. Maximum number of workers for autoscaling.
+       * 
+ * + * int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxCount to set. + * @return This builder for chaining. + */ + public Builder setMaxCount(int value) { + + maxCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Maximum number of workers for autoscaling.
+       * 
+ * + * int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxCount() { + + maxCount_ = 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.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkerResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkerResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SCHEDULER_FIELD_NUMBER = 1; + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + scheduler_; + /** + * + * + *
+   * Optional. Resources used by Airflow schedulers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduler field is set. + */ + @java.lang.Override + public boolean hasScheduler() { + return scheduler_ != null; + } + /** + * + * + *
+   * Optional. Resources used by Airflow schedulers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduler. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + getScheduler() { + return scheduler_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + .getDefaultInstance() + : scheduler_; + } + /** + * + * + *
+   * Optional. Resources used by Airflow schedulers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResourceOrBuilder + getSchedulerOrBuilder() { + return getScheduler(); + } + + public static final int WEB_SERVER_FIELD_NUMBER = 2; + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + webServer_; + /** + * + * + *
+   * Optional. Resources used by Airflow web server.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServer field is set. + */ + @java.lang.Override + public boolean hasWebServer() { + return webServer_ != null; + } + /** + * + * + *
+   * Optional. Resources used by Airflow web server.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServer. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + getWebServer() { + return webServer_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + .getDefaultInstance() + : webServer_; + } + /** + * + * + *
+   * Optional. Resources used by Airflow web server.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResourceOrBuilder + getWebServerOrBuilder() { + return getWebServer(); + } + + public static final int WORKER_FIELD_NUMBER = 3; + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + worker_; + /** + * + * + *
+   * Optional. Resources used by Airflow workers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the worker field is set. + */ + @java.lang.Override + public boolean hasWorker() { + return worker_ != null; + } + /** + * + * + *
+   * Optional. Resources used by Airflow workers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The worker. + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + getWorker() { + return worker_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .getDefaultInstance() + : worker_; + } + /** + * + * + *
+   * Optional. Resources used by Airflow workers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResourceOrBuilder + getWorkerOrBuilder() { + return getWorker(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (scheduler_ != null) { + output.writeMessage(1, getScheduler()); + } + if (webServer_ != null) { + output.writeMessage(2, getWebServer()); + } + if (worker_ != null) { + output.writeMessage(3, getWorker()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scheduler_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getScheduler()); + } + if (webServer_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWebServer()); + } + if (worker_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getWorker()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig)) { + return super.equals(obj); + } + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig other = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) obj; + + if (hasScheduler() != other.hasScheduler()) return false; + if (hasScheduler()) { + if (!getScheduler().equals(other.getScheduler())) return false; + } + if (hasWebServer() != other.hasWebServer()) return false; + if (hasWebServer()) { + if (!getWebServer().equals(other.getWebServer())) return false; + } + if (hasWorker() != other.hasWorker()) return false; + if (hasWorker()) { + if (!getWorker().equals(other.getWorker())) return false; + } + if (!unknownFields.equals(other.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 (hasScheduler()) { + hash = (37 * hash) + SCHEDULER_FIELD_NUMBER; + hash = (53 * hash) + getScheduler().hashCode(); + } + if (hasWebServer()) { + hash = (37 * hash) + WEB_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getWebServer().hashCode(); + } + if (hasWorker()) { + hash = (37 * hash) + WORKER_FIELD_NUMBER; + hash = (53 * hash) + getWorker().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 Kubernetes workloads configuration for GKE cluster associated with the
+   * Cloud Composer environment. Supported for Cloud Composer environments in
+   * versions composer-2.*.*-airflow-*.*.* and newer.
+   * 
+ * + * Protobuf type {@code google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.class, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.Builder.class); + } + + // Construct using + // com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (schedulerBuilder_ == null) { + scheduler_ = null; + } else { + scheduler_ = null; + schedulerBuilder_ = null; + } + if (webServerBuilder_ == null) { + webServer_ = null; + } else { + webServer_ = null; + webServerBuilder_ = null; + } + if (workerBuilder_ == null) { + worker_ = null; + } else { + worker_ = null; + workerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsOuterClass + .internal_static_google_cloud_orchestration_airflow_service_v1beta1_WorkloadsConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + getDefaultInstanceForType() { + return com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig build() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig buildPartial() { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig result = + new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(this); + if (schedulerBuilder_ == null) { + result.scheduler_ = scheduler_; + } else { + result.scheduler_ = schedulerBuilder_.build(); + } + if (webServerBuilder_ == null) { + result.webServer_ = webServer_; + } else { + result.webServer_ = webServerBuilder_.build(); + } + if (workerBuilder_ == null) { + result.worker_ = worker_; + } else { + result.worker_ = workerBuilder_.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.orchestration.airflow.service.v1beta1.WorkloadsConfig) { + return mergeFrom( + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig other) { + if (other + == com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .getDefaultInstance()) return this; + if (other.hasScheduler()) { + mergeScheduler(other.getScheduler()); + } + if (other.hasWebServer()) { + mergeWebServer(other.getWebServer()); + } + if (other.hasWorker()) { + mergeWorker(other.getWorker()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + scheduler_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResourceOrBuilder> + schedulerBuilder_; + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduler field is set. + */ + public boolean hasScheduler() { + return schedulerBuilder_ != null || scheduler_ != null; + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduler. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + getScheduler() { + if (schedulerBuilder_ == null) { + return scheduler_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.getDefaultInstance() + : scheduler_; + } else { + return schedulerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setScheduler( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + value) { + if (schedulerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduler_ = value; + onChanged(); + } else { + schedulerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setScheduler( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + .Builder + builderForValue) { + if (schedulerBuilder_ == null) { + scheduler_ = builderForValue.build(); + onChanged(); + } else { + schedulerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeScheduler( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + value) { + if (schedulerBuilder_ == null) { + if (scheduler_ != null) { + scheduler_ = + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.newBuilder(scheduler_) + .mergeFrom(value) + .buildPartial(); + } else { + scheduler_ = value; + } + onChanged(); + } else { + schedulerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearScheduler() { + if (schedulerBuilder_ == null) { + scheduler_ = null; + onChanged(); + } else { + scheduler_ = null; + schedulerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + .Builder + getSchedulerBuilder() { + + onChanged(); + return getSchedulerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResourceOrBuilder + getSchedulerOrBuilder() { + if (schedulerBuilder_ != null) { + return schedulerBuilder_.getMessageOrBuilder(); + } else { + return scheduler_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.getDefaultInstance() + : scheduler_; + } + } + /** + * + * + *
+     * Optional. Resources used by Airflow schedulers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResourceOrBuilder> + getSchedulerFieldBuilder() { + if (schedulerBuilder_ == null) { + schedulerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResource.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .SchedulerResourceOrBuilder>(getScheduler(), getParentForChildren(), isClean()); + scheduler_ = null; + } + return schedulerBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + webServer_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResourceOrBuilder> + webServerBuilder_; + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServer field is set. + */ + public boolean hasWebServer() { + return webServerBuilder_ != null || webServer_ != null; + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServer. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + getWebServer() { + if (webServerBuilder_ == null) { + return webServer_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.getDefaultInstance() + : webServer_; + } else { + return webServerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + value) { + if (webServerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webServer_ = value; + onChanged(); + } else { + webServerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + .Builder + builderForValue) { + if (webServerBuilder_ == null) { + webServer_ = builderForValue.build(); + onChanged(); + } else { + webServerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWebServer( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + value) { + if (webServerBuilder_ == null) { + if (webServer_ != null) { + webServer_ = + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.newBuilder(webServer_) + .mergeFrom(value) + .buildPartial(); + } else { + webServer_ = value; + } + onChanged(); + } else { + webServerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWebServer() { + if (webServerBuilder_ == null) { + webServer_ = null; + onChanged(); + } else { + webServer_ = null; + webServerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + .Builder + getWebServerBuilder() { + + onChanged(); + return getWebServerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResourceOrBuilder + getWebServerOrBuilder() { + if (webServerBuilder_ != null) { + return webServerBuilder_.getMessageOrBuilder(); + } else { + return webServer_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.getDefaultInstance() + : webServer_; + } + } + /** + * + * + *
+     * Optional. Resources used by Airflow web server.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResourceOrBuilder> + getWebServerFieldBuilder() { + if (webServerBuilder_ == null) { + webServerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResource.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WebServerResourceOrBuilder>(getWebServer(), getParentForChildren(), isClean()); + webServer_ = null; + } + return webServerBuilder_; + } + + private com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + worker_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResourceOrBuilder> + workerBuilder_; + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the worker field is set. + */ + public boolean hasWorker() { + return workerBuilder_ != null || worker_ != null; + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The worker. + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + getWorker() { + if (workerBuilder_ == null) { + return worker_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .getDefaultInstance() + : worker_; + } else { + return workerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWorker( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + value) { + if (workerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + worker_ = value; + onChanged(); + } else { + workerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setWorker( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .Builder + builderForValue) { + if (workerBuilder_ == null) { + worker_ = builderForValue.build(); + onChanged(); + } else { + workerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeWorker( + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + value) { + if (workerBuilder_ == null) { + if (worker_ != null) { + worker_ = + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .newBuilder(worker_) + .mergeFrom(value) + .buildPartial(); + } else { + worker_ = value; + } + onChanged(); + } else { + workerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearWorker() { + if (workerBuilder_ == null) { + worker_ = null; + onChanged(); + } else { + worker_ = null; + workerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .Builder + getWorkerBuilder() { + + onChanged(); + return getWorkerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResourceOrBuilder + getWorkerOrBuilder() { + if (workerBuilder_ != null) { + return workerBuilder_.getMessageOrBuilder(); + } else { + return worker_ == null + ? com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .getDefaultInstance() + : worker_; + } + } + /** + * + * + *
+     * Optional. Resources used by Airflow workers.
+     * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + .Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResourceOrBuilder> + getWorkerFieldBuilder() { + if (workerBuilder_ == null) { + workerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResource.Builder, + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + .WorkerResourceOrBuilder>(getWorker(), getParentForChildren(), isClean()); + worker_ = null; + } + return workerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + private static final com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); + } + + public static com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WorkloadsConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WorkloadsConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WorkloadsConfigOrBuilder.java b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WorkloadsConfigOrBuilder.java new file mode 100644 index 00000000..49776c92 --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/java/com/google/cloud/orchestration/airflow/service/v1beta1/WorkloadsConfigOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/orchestration/airflow/service/v1beta1/environments.proto + +package com.google.cloud.orchestration.airflow.service.v1beta1; + +public interface WorkloadsConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Resources used by Airflow schedulers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the scheduler field is set. + */ + boolean hasScheduler(); + /** + * + * + *
+   * Optional. Resources used by Airflow schedulers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The scheduler. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + getScheduler(); + /** + * + * + *
+   * Optional. Resources used by Airflow schedulers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResourceOrBuilder + getSchedulerOrBuilder(); + + /** + * + * + *
+   * Optional. Resources used by Airflow web server.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the webServer field is set. + */ + boolean hasWebServer(); + /** + * + * + *
+   * Optional. Resources used by Airflow web server.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The webServer. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + getWebServer(); + /** + * + * + *
+   * Optional. Resources used by Airflow web server.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResourceOrBuilder + getWebServerOrBuilder(); + + /** + * + * + *
+   * Optional. Resources used by Airflow workers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the worker field is set. + */ + boolean hasWorker(); + /** + * + * + *
+   * Optional. Resources used by Airflow workers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The worker. + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource getWorker(); + /** + * + * + *
+   * Optional. Resources used by Airflow workers.
+   * 
+ * + * + * .google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResourceOrBuilder + getWorkerOrBuilder(); +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto new file mode 100644 index 00000000..76fb19ee --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -0,0 +1,971 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Managed Apache Airflow Environments. +service Environments { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new environment. + rpc CreateEnvironment(CreateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Get an existing environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List environments. + rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an environment. + rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "name,environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Delete an environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Restart Airflow web server. + rpc RestartWebServer(RestartWebServerRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Check if an upgrade operation on the environment will succeed. + // + // In case of problems detailed info can be found in the returned Operation. + rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } +} + +// Create a new environment. +message CreateEnvironmentRequest { + // The parent must be of the form + // "projects/{projectId}/locations/{locationId}". + string parent = 1; + + // The environment to create. + Environment environment = 2; +} + +// Get an environment. +message GetEnvironmentRequest { + // The resource name of the environment to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// List environments in a project and location. +message ListEnvironmentsRequest { + // List environments in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of environments to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The environments in a project and location. +message ListEnvironmentsResponse { + // The list of environments returned by a ListEnvironmentsRequest. + repeated Environment environments = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Delete an environment. +message DeleteEnvironmentRequest { + // The environment to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Update an environment. +message UpdateEnvironmentRequest { + // The relative resource name of the environment to update, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 2; + + // A patch environment. Fields specified by the `updateMask` will be copied + // from the patch environment into the environment under update. + Environment environment = 1; + + // Required. A comma-separated list of paths, relative to `Environment`, of + // fields to update. + // For example, to set the version of scikit-learn to install in the + // environment to 0.19.0 and to remove an existing installation of + // argparse, the `updateMask` parameter would include the following two + // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + // "config.softwareConfig.pypiPackages.argparse". The included patch + // environment would specify the scikit-learn version as follows: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "scikit-learn":"==0.19.0" + // } + // } + // } + // } + // + // Note that in the above example, any existing PyPI packages + // other than scikit-learn and argparse will be unaffected. + // + // Only one update type may be included in a single request's `updateMask`. + // For example, one cannot update both the PyPI packages and + // labels in the same request. However, it is possible to update multiple + // members of a map field simultaneously in the same request. For example, + // to set the labels "label1" and "label2" while clearing "label3" (assuming + // it already exists), one can + // provide the paths "labels.label1", "labels.label2", and "labels.label3" + // and populate the patch environment as follows: + // + // { + // "labels":{ + // "label1":"new-label1-value" + // "label2":"new-label2-value" + // } + // } + // + // Note that in the above example, any existing labels that are not + // included in the `updateMask` will be unaffected. + // + // It is also possible to replace an entire map field by providing the + // map field's path in the `updateMask`. The new value of the field will + // be that which is provided in the patch environment. For example, to + // delete all pre-existing user-specified PyPI packages and + // install botocore at version 1.7.14, the `updateMask` would contain + // the path "config.softwareConfig.pypiPackages", and + // the patch environment would be the following: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "botocore":"==1.7.14" + // } + // } + // } + // } + // + // **Note:** Only the following fields can be updated: + // + // * `config.softwareConfig.pypiPackages` + // * Replace all custom custom PyPI packages. If a replacement + // package map is not included in `environment`, all custom + // PyPI packages are cleared. It is an error to provide both + // this mask and a mask specifying an individual package. + // * `config.softwareConfig.pypiPackages.`packagename + // * Update the custom PyPI package *packagename*, + // preserving other packages. To delete the package, include it in + // `updateMask`, and omit the mapping for it in + // `environment.config.softwareConfig.pypiPackages`. It is an error + // to provide both a mask of this form and the + // `config.softwareConfig.pypiPackages` mask. + // * `labels` + // * Replace all environment labels. If a replacement labels map is not + // included in `environment`, all labels are cleared. It is an error to + // provide both this mask and a mask specifying one or more individual + // labels. + // * `labels.`labelName + // * Set the label named *labelName*, while preserving other + // labels. To delete the label, include it in `updateMask` and omit its + // mapping in `environment.labels`. It is an error to provide both a + // mask of this form and the `labels` mask. + // * `config.nodeCount` + // * Horizontally scale the number of nodes in the environment. An integer + // greater than or equal to 3 must be provided in the `config.nodeCount` + // field. * `config.webServerNetworkAccessControl` + // * Replace the environment's current WebServerNetworkAccessControl. + // * `config.softwareConfig.airflowConfigOverrides` + // * Replace all Apache Airflow config overrides. If a replacement config + // overrides map is not included in `environment`, all config overrides + // are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual config overrides. + // * `config.softwareConfig.airflowConfigOverrides.`section-name + // * Override the Apache Airflow config property *name* in the + // section named *section*, preserving other properties. To + // delete the property override, include it in `updateMask` and omit its + // mapping in + // `environment.config.softwareConfig.airflowConfigOverrides`. + // It is an error to provide both a mask of this form and the + // `config.softwareConfig.airflowConfigOverrides` mask. + // * `config.softwareConfig.envVariables` + // * Replace all environment variables. If a replacement environment + // variable map is not included in `environment`, all custom environment + // variables are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual environment variables. + // * `config.softwareConfig.imageVersion` + // * Upgrade the version of the environment in-place. Refer to + // `SoftwareConfig.image_version` for information on how to format the + // new image version. Additionally, the new image version cannot effect + // a version downgrade and must match the current image version's + // Composer major version and Airflow major and minor versions. Consult + // the [Cloud Composer Version + // List](https://cloud.google.com/composer/docs/concepts/versioning/composer-versions) + // for valid values. + // * `config.softwareConfig.schedulerCount` + // * Horizontally scale the number of schedulers in Airflow. A positive + // integer not greater than the number of nodes must be provided in the + // `config.softwareConfig.schedulerCount` field. * `config.databaseConfig.machineType` + // * Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, + // db-n1-standard-8 or db-n1-standard-16. * `config.webServerConfig.machineType` + // * Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + // or composer-n1-webserver-8. * `config.maintenanceWindow` + // * Maintenance window during which Cloud Composer components may be + // under maintenance. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Restart Airflow web server. +message RestartWebServerRequest { + // The resource name of the environment to restart the web server for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Configuration information for an environment. +message EnvironmentConfig { + // The size of the Cloud Composer environment. + enum EnvironmentSize { + // The size of the environment is unspecified. + ENVIRONMENT_SIZE_UNSPECIFIED = 0; + + // The environment size is small. + ENVIRONMENT_SIZE_SMALL = 1; + + // The environment size is medium. + ENVIRONMENT_SIZE_MEDIUM = 2; + + // The environment size is large. + ENVIRONMENT_SIZE_LARGE = 3; + } + + // Output only. The Kubernetes Engine cluster used to run this environment. + string gke_cluster = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud + // Storage objects reside in a flat namespace, a hierarchical file tree + // can be simulated using "/"-delimited object name prefixes. DAG objects for + // this environment reside in a simulated directory with the given prefix. + string dag_gcs_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The number of nodes in the Kubernetes Engine cluster that will be + // used to run this environment. + int32 node_count = 3; + + // The configuration settings for software inside the environment. + SoftwareConfig software_config = 4; + + // The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5; + + // The configuration used for the Private IP Cloud Composer environment. + PrivateEnvironmentConfig private_environment_config = 7; + + // Optional. The network-level access control policy for the Airflow web server. If + // unspecified, no network-level access restrictions will be applied. + WebServerNetworkAccessControl web_server_network_access_control = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for Cloud SQL instance used internally by Apache + // Airflow software. + DatabaseConfig database_config = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for the Airflow web server App Engine instance. + WebServerConfig web_server_config = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI of the Apache Airflow Web UI hosted within this environment (see + // [Airflow web + // interface](/composer/docs/how-to/accessing/airflow-web-interface)). + string airflow_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The encryption options for the Cloud Composer environment and its + // dependencies. Cannot be updated. + EncryptionConfig encryption_config = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maintenance window is the period when Cloud Composer components may + // undergo maintenance. It is defined so that maintenance is not executed + // during peak hours or critical time periods. + // + // The system will not be under maintenance for every occurrence of this + // window, but when maintenance is planned, it will be scheduled + // during the window. + // + // The maintenance window period must encompass at least 12 hours per week. + // This may be split into multiple chunks, each with a size of + // at least 4 hours. + // + // If this value is omitted, Cloud Composer components may be subject to + // maintenance at any time. + MaintenanceWindow maintenance_window = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The workloads configuration settings for the GKE cluster associated with + // the Cloud Composer environment. The GKE cluster runs Airflow scheduler, web + // server and workers workloads. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + WorkloadsConfig workloads_config = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the Cloud Composer environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + EnvironmentSize environment_size = 16 [(google.api.field_behavior) = OPTIONAL]; +} + +// Network-level access control policy for the Airflow web server. +message WebServerNetworkAccessControl { + // Allowed IP range with user-provided description. + message AllowedIpRange { + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // IP range prefixes should be properly truncated. For example, + // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + // `2001:db8::1/32` should be truncated to `2001:db8::/32`. + string value = 1; + + // Optional. User-provided description. It must contain at most 300 characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // A collection of allowed IP ranges with descriptions. + repeated AllowedIpRange allowed_ip_ranges = 1; +} + +// Specifies the selection and configuration of software inside the environment. +message SoftwareConfig { + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the version is a + // [semantic version](https://semver.org) or `latest`. When the patch version + // is omitted, the current Cloud Composer patch version is selected. + // When `latest` is provided instead of an explicit version number, + // the server replaces `latest` with the current Cloud Composer version + // and stores that version number in the same field. + // + // The portion of the image version that follows *airflow-* is an + // official Apache Airflow repository + // [release name](https://github.com/apache/incubator-airflow/releases). + // + // See also [Version + // List](/composer/docs/concepts/versioning/composer-versions). + string image_version = 1; + + // Optional. Apache Airflow configuration properties to override. + // + // Property keys contain the section and property names, separated by a + // hyphen, for example "core-dags_are_paused_at_creation". Section names must + // not contain hyphens ("-"), opening square brackets ("["), or closing + // square brackets ("]"). The property name must not be empty and must not + // contain an equals sign ("=") or semicolon (";"). Section and property names + // must not contain a period ("."). Apache Airflow configuration property + // names must be written in + // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + // contain any character, and can be written in any lower/upper case format. + // + // Certain Apache Airflow configuration property values are + // [blocked](/composer/docs/concepts/airflow-configurations), + // and cannot be overridden. + map airflow_config_overrides = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom Python Package Index (PyPI) packages to be installed in + // the environment. + // + // Keys refer to the lowercase package name such as "numpy" + // and values are the lowercase extras and version specifier such as + // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + // package without pinning it to a version specifier, use the empty string as + // the value. + map pypi_packages = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional environment variables to provide to the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Environment variable names must match the regular expression + // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + // software configuration overrides (they cannot match the regular expression + // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + // following reserved names: + // + // * `AIRFLOW_HOME` + // * `C_FORCE_ROOT` + // * `CONTAINER_NAME` + // * `DAGS_FOLDER` + // * `GCP_PROJECT` + // * `GCS_BUCKET` + // * `GKE_CLUSTER_NAME` + // * `SQL_DATABASE` + // * `SQL_INSTANCE` + // * `SQL_PASSWORD` + // * `SQL_PROJECT` + // * `SQL_REGION` + // * `SQL_USER` + map env_variables = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The major version of Python used to run the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + // updated. + string python_version = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for controlling how IPs are allocated in the +// GKE cluster. +message IPAllocationPolicy { + // Optional. Whether or not to enable Alias IPs in the GKE cluster. + // If `true`, a VPC-native cluster is created. + bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the cluster's secondary range used to allocate + // IP addresses to pods. Specify either `cluster_secondary_range_name` + // or `cluster_ipv4_cidr_block` but not both. + // + // This field is applicable only when `use_ip_aliases` is true. + string cluster_secondary_range_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the services' secondary range used to allocate + // IP addresses to the cluster. Specify either `services_secondary_range_name` + // or `services_ipv4_cidr_block` but not both. + // + // This field is applicable only when `use_ip_aliases` is true. + string services_secondary_range_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range used to allocate IP addresses to pods in + // the cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block` + // but not both. + string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range of the services IP addresses in this + // cluster. + // + // This field is applicable only when `use_ip_aliases` is true. + // + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // Specify `services_secondary_range_name` or `services_ipv4_cidr_block` + // but not both. + string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration information for the Kubernetes Engine nodes running +// the Apache Airflow software. +message NodeConfig { + // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + // to deploy the VMs used to run the Apache Airflow software, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}". + // + // This `location` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.machineType` are specified, + // `nodeConfig.machineType` must belong to this `location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If only one field (`location` or `nodeConfig.machineType`) is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + string location = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine + // [machine type](/compute/docs/machine-types) used for cluster instances, + // specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + // + // The `machineType` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.location` are specified, + // this `machineType` must belong to the `nodeConfig.location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If exactly one of this field and `nodeConfig.location` is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // The `machineTypeId` must not be a [shared-core machine + // type](/compute/docs/machine-types#sharedcore). + // + // If this field is unspecified, the `machineTypeId` defaults + // to "n1-standard-1". + string machine_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine network to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/global/networks/{networkId}". + // + // If unspecified, the default network in the environment's project is used. + // If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // is provided, `nodeConfig.subnetwork` must also be provided. For + // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + // `nodeConfig.subnetwork`. + string network = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + // + // If a subnetwork is provided, `nodeConfig.network` must also be provided, + // and the subnetwork must belong to the enclosing environment's project and + // location. + string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The disk size in GB used for node VMs. Minimum size is 20GB. + // If unspecified, defaults to 100GB. Cannot be updated. + int32 disk_size_gb = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of Google API scopes to be made available on all + // node VMs. If `oauth_scopes` is empty, defaults to + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + repeated string oauth_scopes = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Google Cloud Platform Service Account to be used by the workloads. If a + // service account is not specified, the "default" Compute Engine service + // account is used. Cannot be updated. + string service_account = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of instance tags applied to all node VMs. Tags are used + // to identify valid sources or targets for network firewalls. Each tag within + // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + // Cannot be updated. + repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IPAllocationPolicy fields for the GKE cluster. + IPAllocationPolicy ip_allocation_policy = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of pods per node in the Cloud Composer GKE cluster. + // The value must be between 8 and 110 and it can be set only if + // the environment is VPC-native. + // The default value is 32. Values of this field will be propagated both to + // the `default-pool` node pool of the newly created GKE cluster, and to the + // default "Maximum Pods per Node" value which is used for newly created + // node pools if their value is not explicitly set during node pool creation. + // For more information, see [Optimizing IP address allocation] + // (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr). + // Cannot be updated. + int32 max_pods_per_node = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the private GKE cluster in a Cloud Composer +// environment. +message PrivateClusterConfig { + // Optional. If `true`, access to the public endpoint of the GKE cluster is + // denied. + bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If + // left blank, the default value of '172.16.0.0/23' is used. + string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range in CIDR notation to use for the hosted master network. This + // range is used for assigning internal IP addresses to the cluster + // master or set of masters and to the internal load balancer virtual IP. + // This range must not overlap with any other ranges in use + // within the cluster's network. + string master_ipv4_reserved_range = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The configuration information for configuring a Private IP Cloud Composer +// environment. +message PrivateEnvironmentConfig { + // Optional. If `true`, a Private IP Cloud Composer environment is created. + // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + // set to true . + bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the private GKE cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig private_cluster_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range for web server will be reserved. Needs + // to be disjoint from private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + string web_server_ipv4_cidr_block = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range in tenant project will be reserved for + // Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block + string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's App Engine VMs. + string web_server_ipv4_reserved_range = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The CIDR block from which IP range for Cloud Composer Network in tenant + // project will be reserved. Needs to be disjoint from + // private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_cidr_block = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's Cloud Composer network. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_reserved_range = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The configuration of Cloud SQL instance that is used by the Apache Airflow +// software. +message DatabaseConfig { + // Optional. Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for the Airflow web server App Engine instance. +message WebServerConfig { + // Optional. Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + // composer-n1-webserver-8. + // If not specified, composer-n1-webserver-2 will be used. + // Value custom is returned only in response, if Airflow web server parameters + // were manually changed to a non-standard values. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The encryption options for the Cloud Composer environment and its +// dependencies. +message EncryptionConfig { + // Optional. Customer-managed Encryption Key available through Google's Key Management + // Service. Cannot be updated. + // If not specified, Google-managed key will be used. + string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for Cloud Composer maintenance window. +// +// The following example: +// +// { +// "startTime":"2019-08-01T01:00:00Z" +// "endTime":"2019-08-01T07:00:00Z" +// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" +// } +// +// would define a maintenance window between 01 and 07 hours UTC during +// each Tuesday and Wednesday. +message MaintenanceWindow { + // Required. Start time of the first recurrence of the maintenance window. + google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window end time. It is used only to calculate the duration of + // the maintenance window. + // The value for end_time must be in the future, relative to `start_time`. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window recurrence. Format is a subset of + // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The Kubernetes workloads configuration for GKE cluster associated with the +// Cloud Composer environment. Supported for Cloud Composer environments in +// versions composer-2.*.*-airflow-*.*.* and newer. +message WorkloadsConfig { + // Configuration for resources used by Airflow schedulers. + message SchedulerResource { + // Optional. CPU request and limit for a single Airflow scheduler replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow scheduler replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow scheduler replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of schedulers. + int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow web server. + message WebServerResource { + // Optional. CPU request and limit for Airflow web server. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for Airflow web server. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for Airflow web server. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow workers. + message WorkerResource { + // Optional. CPU request and limit for a single Airflow worker replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow worker replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow worker replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum number of workers for autoscaling. + int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of workers for autoscaling. + int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Resources used by Airflow schedulers. + SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow web server. + WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow workers. + WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// An environment for running orchestration tasks. +message Environment { + option (google.api.resource) = { + type: "composer.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/environments/{environment}" + }; + + // State of the environment. + enum State { + // The state of the environment is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being created. + CREATING = 1; + + // The environment is currently running and healthy. It is ready for use. + RUNNING = 2; + + // The environment is being updated. It remains usable but cannot receive + // additional update requests or be deleted at this time. + UPDATING = 3; + + // The environment is undergoing deletion. It cannot be used. + DELETING = 4; + + // The environment has encountered an error and cannot be used. + ERROR = 5; + } + + // The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + // + // EnvironmentId must start with a lowercase letter followed by up to 63 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string name = 1; + + // Configuration parameters for this environment. + EnvironmentConfig config = 2; + + // Output only. The UUID (Universally Unique IDentifier) associated with this environment. + // This value is generated when the environment is created. + string uuid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The current state of the environment. + State state = 4; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this environment was last modified. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for this environment. + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to check whether image upgrade will succeed. +message CheckUpgradeRequest { + // The resource name of the environment to check upgrade for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+\.[0-9]+\.[0-9]+|latest)-airflow-[0-9]+\.[0-9]+(\.[0-9]+.*)?`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the version is a + // [semantic version](https://semver.org) or `latest`. When the patch version + // is omitted, the current Cloud Composer patch version is selected. + // When `latest` is provided instead of an explicit version number, + // the server replaces `latest` with the current Cloud Composer version + // and stores that version number in the same field. + // + // The portion of the image version that follows `airflow-` is an + // official Apache Airflow repository + // [release name](https://github.com/apache/incubator-airflow/releases). + // + // See also [Version List] + // (/composer/docs/concepts/versioning/composer-versions). + string image_version = 2; +} + +// Message containing information about the result of an upgrade check +// operation. +message CheckUpgradeResponse { + // Whether there were python modules conflict during image build. + enum ConflictResult { + // It is unknown whether build had conflicts or not. + CONFLICT_RESULT_UNSPECIFIED = 0; + + // There were python packages conflicts. + CONFLICT = 1; + + // There were no python packages conflicts. + NO_CONFLICT = 2; + } + + // Output only. Url for a docker build log of an upgraded image. + string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether build has succeeded or failed on modules conflicts. + ConflictResult contains_pypi_modules_conflict = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extract from a docker image build log containing information about pypi + // modules conflicts. + string pypi_conflict_build_log_extract = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Composer image for which the build was happening. + string image_version = 5; + + // Pypi dependencies specified in the environment configuration, at the time + // when the build was triggered. + map pypi_dependencies = 6; +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto new file mode 100644 index 00000000..6a7d5f4c --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto @@ -0,0 +1,88 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/type/date.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Readonly service to query available ImageVersions. +service ImageVersions { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // List ImageVersions for provided location. + rpc ListImageVersions(ListImageVersionsRequest) returns (ListImageVersionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/imageVersions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List ImageVersions in a project and location. +message ListImageVersionsRequest { + // List ImageVersions in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of image_versions to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Whether or not image versions from old releases should be included. + bool include_past_releases = 4; +} + +// The ImageVersions in a project and location. +message ListImageVersionsResponse { + // The list of supported ImageVersions in a location. + repeated ImageVersion image_versions = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Image Version information +message ImageVersion { + // The string identifier of the ImageVersion, in the form: + // "composer-x.y.z-airflow-a.b(.c)" + string image_version_id = 1; + + // Whether this is the default ImageVersion used by Composer during + // environment creation if no input ImageVersion is specified. + bool is_default = 2; + + // supported python versions + repeated string supported_python_versions = 3; + + // The date of the version release. + google.type.Date release_date = 4; + + // Whether it is impossible to create an environment with the image version. + bool creation_disabled = 5; + + // Whether it is impossible to upgrade an environment running with the image + // version. + bool upgrade_disabled = 6; +} diff --git a/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto new file mode 100644 index 00000000..00b4d21d --- /dev/null +++ b/proto-google-cloud-orchestration-airflow-v1beta1/src/main/proto/google/cloud/orchestration/airflow/service/v1beta1/operations.proto @@ -0,0 +1,84 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.orchestration.airflow.service.v1beta1; + +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/orchestration/airflow/service/v1beta1;service"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Metadata describing an operation. +message OperationMetadata { + // An enum describing the overall state of an operation. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCESSFUL = 3; + + // The operation is no longer running but did not succeed. + FAILED = 4; + } + + // Type of longrunning operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // A resource creation operation. + CREATE = 1; + + // A resource deletion operation. + DELETE = 2; + + // A resource update operation. + UPDATE = 3; + + // A resource check operation. + CHECK = 4; + } + + // Output only. The current operation state. + State state = 1; + + // Output only. The type of operation being performed. + Type operation_type = 2; + + // Output only. The resource being operated on, as a [relative resource name]( + // /apis/design/resource_names#relative_resource_name). + string resource = 3; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4; + + // Output only. The time the operation was submitted to the server. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time when the operation terminated, regardless of its success. + // This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..583c6bcf --- /dev/null +++ b/renovate.json @@ -0,0 +1,73 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-orchestration-airflow", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..37116e32 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + orchestration-airflow-install-without-bom + jar + Google Cloud Composer Install Without Bom + https://github.com/googleapis/java-orchestration-airflow + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-orchestration-airflow + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 00000000..cfabf89d --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-orchestration-airflow-samples + 0.0.1-SNAPSHOT + pom + Google Cloud Composer Samples Parent + https://github.com/googleapis/java-orchestration-airflow + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 00000000..0730eded --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + orchestration-airflow-snapshot + jar + Google Cloud Composer Snapshot Samples + https://github.com/googleapis/java-orchestration-airflow + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-orchestration-airflow + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 00000000..dc7a1d57 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + orchestration-airflow-snippets + jar + Google Cloud Composer Snippets + https://github.com/googleapis/java-orchestration-airflow + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-orchestration-airflow + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..3d6e721a --- /dev/null +++ b/versions.txt @@ -0,0 +1,8 @@ +# Format: +# module:released-version:current-version + +google-cloud-orchestration-airflow:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-orchestration-airflow-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-orchestration-airflow-v1beta1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-orchestration-airflow-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-orchestration-airflow-v1beta1:0.0.0:0.0.1-SNAPSHOT