diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 5232f38f..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,15 +0,0 @@ -# Code owners file. -# This file controls who is tagged for review for any given pull request. - -# For syntax help see: -# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax - -# The @googleapis/aap-dpes is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/aap-dpes - - -# The java-samples-reviewers team is the default owner for samples changes -samples/**/*.java @googleapis/java-samples-reviewers - -# Generated snippets should not be owned by samples reviewers -samples/snippets/generated/ @googleapis/yoshi-java diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 27971603..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -:bus: This library has moved to -[google-cloud-java/java-workflows]( -https://github.com/googleapis/google-cloud-java/tree/main/java-workflows). -This repository will be archived in the future. - -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-workflows/issues - - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform - -If you are still having issues, please include as much information as possible: - -#### Environment details - -1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). - General, Core, and Other are also allowed as types -2. OS type and version: -3. Java version: -4. version(s): - -#### Steps to reproduce - - 1. ? - 2. ? - -#### Code example - -```java -// example -``` - -#### Stack trace -``` -Any relevant stacktrace here. -``` - -#### External references such as API reference guides - -- ? - -#### Any additional information below - - -Following these steps guarantees the quickest resolution possible. - -Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 949024e1..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this library - ---- - -:bus: This library has moved to -[google-cloud-java/java-workflows]( -https://github.com/googleapis/google-cloud-java/tree/main/java-workflows). -This repository will be archived in the future. - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - -**Is your feature request related to a problem? Please describe.** -What the problem is. Example: I'm always frustrated when [...] - -**Describe the solution you'd like** -What you want to happen. - -**Describe alternatives you've considered** -Any alternative solutions or features you've considered. - -**Additional context** -Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md deleted file mode 100644 index 99586903..00000000 --- a/.github/ISSUE_TEMPLATE/support_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Support request -about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. - ---- - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 1cb6767c..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ -Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: -- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-workflows/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea -- [ ] Ensure the tests and linter pass -- [ ] Code coverage does not decrease (if any source code was changed) -- [ ] Appropriate docs were updated (if necessary) - -Fixes # ☕️ - -If you write sample code, please follow the [samples format]( -https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml deleted file mode 100644 index 4caef688..00000000 --- a/.github/auto-label.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -requestsize: - enabled: true diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml deleted file mode 100644 index 2176b054..00000000 --- a/.github/blunderbuss.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss -assign_prs_by: -- labels: - - samples - to: - - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml deleted file mode 100644 index c644a24e..00000000 --- a/.github/generated-files-bot.yml +++ /dev/null @@ -1,12 +0,0 @@ -externalManifests: -- type: json - file: 'synth.metadata' - jsonpath: '$.generatedFiles[*]' -- type: json - file: '.github/readme/synth.metadata/synth.metadata' - jsonpath: '$.generatedFiles[*]' -ignoreAuthors: -- 'renovate-bot' -- 'yoshi-automation' -- 'release-please[bot]' -- 'gcf-owl-bot[bot]' diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 0501f63f..00000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,42 +0,0 @@ -rebaseMergeAllowed: false -squashMergeAllowed: true -mergeCommitAllowed: false -branchProtectionRules: - - pattern: main - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (8) - - dependencies (11) - - lint - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - OwlBot Post Processor - - 'Kokoro - Test: Java GraalVM Native Image' - - 'Kokoro - Test: Java 17 GraalVM Native Image' - - pattern: java7 - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (8) - - dependencies (11) - - lint - - units (7) - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - OwlBot Post Processor -permissionRules: - - team: yoshi-admins - permission: admin - - team: yoshi-java-admins - permission: admin - - team: yoshi-java - permission: push diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml deleted file mode 100644 index a0ba1f7d..00000000 --- a/.github/trusted-contribution.yml +++ /dev/null @@ -1,3 +0,0 @@ -trustedContributors: -- renovate-bot -- gcf-owl-bot[bot] diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml deleted file mode 100644 index f5fc7d51..00000000 --- a/.github/workflows/approve-readme.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: auto-merge-readme -jobs: - approve: - runs-on: ubuntu-latest - if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' - steps: - - uses: actions/github-script@v6 - with: - github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} - script: | - // only approve PRs from yoshi-automation - if (context.payload.pull_request.user.login !== "yoshi-automation") { - return; - } - - // only approve PRs like "chore: release " - if (!context.payload.pull_request.title === "chore: regenerate README") { - return; - } - - // only approve PRs with README.md and synth.metadata changes - const files = new Set( - ( - await github.paginate( - github.pulls.listFiles.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }) - ) - ).map(file => file.filename) - ); - if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { - return; - } - - // approve README regeneration PR - await github.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Rubber stamped PR!', - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }); - - // attach automerge label - await github.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ['automerge'] - }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml deleted file mode 100644 index 7a106d00..00000000 --- a/.github/workflows/auto-release.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: auto-release -jobs: - approve: - runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-please') - steps: - - uses: actions/github-script@v6 - with: - github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} - debug: true - script: | - // only approve PRs from release-please[bot] - if (context.payload.pull_request.user.login !== "release-please[bot]") { - return; - } - - // only approve PRs like "chore(main): release " - if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { - return; - } - - // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.rest.pulls.listFiles.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }); - const changed_files = await github.paginate(filesPromise) - - if ( changed_files.length < 1 ) { - console.log( "Not proceeding since PR is empty!" ) - return; - } - - if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { - console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) - return; - } - - // trigger auto-release when - // 1) it is a SNAPSHOT release (auto-generated post regular release) - // 2) there are dependency updates only - // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) - if ( - context.payload.pull_request.body.includes("Fix") || - context.payload.pull_request.body.includes("Build") || - context.payload.pull_request.body.includes("Documentation") || - context.payload.pull_request.body.includes("BREAKING CHANGES") || - context.payload.pull_request.body.includes("Features") - ) { - console.log( "Not auto-releasing since it is not a dependency-update-only release." ); - return; - } - - const promise = github.rest.pulls.list.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open' - }); - const open_pulls = await github.paginate(promise) - - if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { - for ( const pull of open_pulls ) { - if ( pull.title.startsWith("deps: update dependency") ) { - console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); - return; - } - } - } - - // approve release PR - await github.rest.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Rubber stamped release!', - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }); - - // attach kokoro:force-run and automerge labels - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ['kokoro:force-run', 'automerge'] - }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index e3bb26e3..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - push: - branches: - - main - pull_request: -name: ci -jobs: - units: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java: [8, 11, 17] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test - windows: - runs-on: windows-latest - steps: - - name: Support longpaths - run: git config --system core.longpaths true - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.bat - env: - JOB_TYPE: test - dependencies: - runs-on: ubuntu-latest - strategy: - matrix: - java: [8, 11, 17] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/dependencies.sh - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 11 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: lint - clirr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: clirr diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml deleted file mode 100644 index 912ed8b2..00000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: samples -jobs: - checkstyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - name: Run checkstyle - run: mvn -P lint --quiet --batch-mode checkstyle:check - working-directory: samples/snippets diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cc0bc34a..00000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# Maven -target/ - -# Eclipse -.classpath -.project -.settings - -# Intellij -*.iml -.idea/ - -# python utilities -*.pyc -__pycache__ - -.flattened-pom.xml \ No newline at end of file diff --git a/.kokoro/build.bat b/.kokoro/build.bat deleted file mode 100644 index 067cf4a4..00000000 --- a/.kokoro/build.bat +++ /dev/null @@ -1,18 +0,0 @@ -:: Copyright 2022 Google LLC -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at -:: -:: http://www.apache.org/licenses/LICENSE-2.0 -:: -:: Unless required by applicable law or agreed to in writing, software -:: distributed under the License is distributed on an "AS IS" BASIS, -:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -:: See the License for the specific language governing permissions and -:: limitations under the License. -:: Github action job to test core java library features on -:: downstream client libraries before they are released. -:: See documentation in type-shell-output.bat - -"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh deleted file mode 100755 index 326130b2..00000000 --- a/.kokoro/build.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Maven & Java version -mvn -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C - -# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it -if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then - export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) -fi - -RETURN_CODE=0 -set +e - -case ${JOB_TYPE} in -test) - mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true - RETURN_CODE=$? - ;; -lint) - mvn com.coveo:fmt-maven-plugin:check -B -ntp - RETURN_CODE=$? - ;; -javadoc) - mvn javadoc:javadoc javadoc:test-javadoc -B -ntp - RETURN_CODE=$? - ;; -integration) - mvn -B ${INTEGRATION_TEST_ARGS} \ - -ntp \ - -Penable-integration-tests \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - ;; -graalvm) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test - RETURN_CODE=$? - ;; -graalvm17) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test - RETURN_CODE=$? - ;; -samples) - SAMPLES_DIR=samples - # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. - if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] - then - SAMPLES_DIR=samples/snapshot - fi - - if [[ -f ${SAMPLES_DIR}/pom.xml ]] - then - for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do - [[ -f "$FILE" ]] || continue - source "$FILE" - done - - pushd ${SAMPLES_DIR} - mvn -B \ - -ntp \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - popd - else - echo "no sample pom.xml found - skipping sample tests" - fi - ;; -clirr) - mvn -B -ntp -Denforcer.skip=true clirr:check - RETURN_CODE=$? - ;; -*) - ;; -esac - -if [ "${REPORT_COVERAGE}" == "true" ] -then - bash ${KOKORO_GFILE_DIR}/codecov.sh -fi - -# fix output location of logs -bash .kokoro/coerce_logs.sh - -if [[ "${ENABLE_FLAKYBOT}" == "true" ]] -then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot - ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-workflows -fi - -echo "exiting with ${RETURN_CODE}" -exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh deleted file mode 100755 index 46edbf7f..00000000 --- a/.kokoro/coerce_logs.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script finds and moves sponge logs so that they can be found by placer -# and are not flagged as flaky by sponge. - -set -eo pipefail - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -job=$(basename ${KOKORO_JOB_NAME}) - -echo "coercing sponge logs..." -for xml in `find . -name *-sponge_log.xml` -do - class=$(basename ${xml} | cut -d- -f2) - dir=$(dirname ${xml})/${job}/${class} - text=$(dirname ${xml})/${class}-sponge_log.txt - mkdir -p ${dir} - mv ${xml} ${dir}/sponge_log.xml - mv ${text} ${dir}/sponge_log.txt -done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg deleted file mode 100644 index 4ec98769..00000000 --- a/.kokoro/common.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# All builds use the trampoline script to run in docker. -build_file: "java-workflows/.kokoro/trampoline.sh" - -# Tell the trampoline which build file to use. -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/build.sh" -} diff --git a/.kokoro/common.sh b/.kokoro/common.sh deleted file mode 100644 index f8f957af..00000000 --- a/.kokoro/common.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function retry_with_backoff { - attempts_left=$1 - sleep_seconds=$2 - shift 2 - command=$@ - - - # store current flag state - flags=$- - - # allow a failures to continue - set +e - ${command} - exit_code=$? - - # restore "e" flag - if [[ ${flags} =~ e ]] - then set -e - else set +e - fi - - if [[ $exit_code == 0 ]] - then - return 0 - fi - - # failure - if [[ ${attempts_left} > 0 ]] - then - echo "failure (${exit_code}), sleeping ${sleep_seconds}..." - sleep ${sleep_seconds} - new_attempts=$((${attempts_left} - 1)) - new_sleep=$((${sleep_seconds} * 2)) - retry_with_backoff ${new_attempts} ${new_sleep} ${command} - fi - - return $exit_code -} - -## Helper functionss -function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } -function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } - -## Helper comment to trigger updated repo dependency release \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg deleted file mode 100644 index 5270a080..00000000 --- a/.kokoro/continuous/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-workflows/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/continuous/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh deleted file mode 100755 index bd896024..00000000 --- a/.kokoro/dependencies.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail -shopt -s nullglob - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java -java -version -echo $JOB_TYPE - -function determineMavenOpts() { - local javaVersion=$( - # filter down to the version line, then pull out the version between quotes, - # then trim the version number down to its minimal number (removing any - # update or suffix number). - java -version 2>&1 | grep "version" \ - | sed -E 's/^.*"(.*?)".*$/\1/g' \ - | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' - ) - - if [[ $javaVersion == 17* ]] - then - # MaxPermSize is no longer supported as of jdk 17 - echo -n "-Xmx1024m" - else - echo -n "-Xmx1024m -XX:MaxPermSize=128m" - fi -} - -export MAVEN_OPTS=$(determineMavenOpts) - -# this should run maven enforcer -retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ - -DskipTests=true \ - -Dmaven.javadoc.skip=true \ - -Dclirr.skip=true - -mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg deleted file mode 100644 index 5270a080..00000000 --- a/.kokoro/nightly/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-workflows/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg deleted file mode 100644 index bd0297a3..00000000 --- a/.kokoro/nightly/integration.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg deleted file mode 100644 index dc51b65e..00000000 --- a/.kokoro/nightly/java11-integration.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/java11014" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg deleted file mode 100644 index 709f2b4c..00000000 --- a/.kokoro/nightly/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg deleted file mode 100644 index cb24f44e..00000000 --- a/.kokoro/nightly/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg deleted file mode 100644 index 728da7d6..00000000 --- a/.kokoro/nightly/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-workflows/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg deleted file mode 100644 index 94b8066e..00000000 --- a/.kokoro/nightly/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-workflows/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/nightly/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg deleted file mode 100644 index fee6a838..00000000 --- a/.kokoro/nightly/samples.cfg +++ /dev/null @@ -1,38 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-docs-samples-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh deleted file mode 100755 index f5251425..00000000 --- a/.kokoro/populate-secrets.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} -function msg { println "$*" >&2 ;} -function println { printf '%s\n' "$(now) $*" ;} - - -# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: -# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com -SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" -msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" -mkdir -p ${SECRET_LOCATION} -for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") -do - msg "Retrieving secret ${key}" - docker run --entrypoint=gcloud \ - --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ - gcr.io/google.com/cloudsdktool/cloud-sdk \ - secrets versions access latest \ - --project cloud-devrel-kokoro-resources \ - --secret ${key} > \ - "${SECRET_LOCATION}/${key}" - if [[ $? == 0 ]]; then - msg "Secret written to ${SECRET_LOCATION}/${key}" - else - msg "Error retrieving secret ${key}" - fi -done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg deleted file mode 100644 index ec572442..00000000 --- a/.kokoro/presubmit/clirr.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "clirr" -} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg deleted file mode 100644 index 62bb6c1c..00000000 --- a/.kokoro/presubmit/common.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-workflows/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg deleted file mode 100644 index 0f6d5eea..00000000 --- a/.kokoro/presubmit/dependencies.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/dependencies.sh" -} diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg deleted file mode 100644 index a3f7fb9d..00000000 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17" -} - -env_vars: { - key: "JOB_TYPE" - value: "graalvm17" -} - -# 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" -} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg deleted file mode 100644 index 4c7225ec..00000000 --- a/.kokoro/presubmit/graalvm-native.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" -} - -env_vars: { - key: "JOB_TYPE" - value: "graalvm" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg deleted file mode 100644 index dded67a9..00000000 --- a/.kokoro/presubmit/integration.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg deleted file mode 100644 index 709f2b4c..00000000 --- a/.kokoro/presubmit/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg deleted file mode 100644 index cb24f44e..00000000 --- a/.kokoro/presubmit/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg deleted file mode 100644 index 728da7d6..00000000 --- a/.kokoro/presubmit/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-workflows/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg deleted file mode 100644 index 94b8066e..00000000 --- a/.kokoro/presubmit/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-workflows/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/presubmit/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg deleted file mode 100644 index 76d47c8d..00000000 --- a/.kokoro/presubmit/linkage-monitor.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/linkage-monitor.sh" -} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg deleted file mode 100644 index 6d323c8a..00000000 --- a/.kokoro/presubmit/lint.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "lint" -} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg deleted file mode 100644 index 01e09600..00000000 --- a/.kokoro/presubmit/samples.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-docs-samples-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" -} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh deleted file mode 100755 index 9609b8fd..00000000 --- a/.kokoro/readme.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -cd ${KOKORO_ARTIFACTS_DIR}/github/java-workflows - -# 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-workflows \ - --synth-file-name=.github/readme/synth.py \ - --metadata-path=.github/readme/synth.metadata \ - --pr-title="chore: regenerate README" \ - --branch-suffix="readme" - -# autosynth returns 28 to signal there are no changes -RETURN_CODE=$? -if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] -then - exit ${RETURN_CODE} -fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg deleted file mode 100644 index 9b257127..00000000 --- a/.kokoro/release/bump_snapshot.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-workflows/.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-workflows/.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 deleted file mode 100644 index f035a932..00000000 --- a/.kokoro/release/common.cfg +++ /dev/null @@ -1,49 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-workflows/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-keyring" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-passphrase" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-pubkeyring" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "sonatype-credentials" - } - } -} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh deleted file mode 100755 index 7f78ee41..00000000 --- a/.kokoro/release/common.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# Get secrets from keystore and set and environment variables -setup_environment_secrets() { - export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) - export GPG_TTY=$(tty) - export GPG_HOMEDIR=/gpg - mkdir $GPG_HOMEDIR - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg - export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') - export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') -} - -create_settings_xml_file() { - echo " - - - ossrh - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-staging - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-snapshots - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - -" > $1 -} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg deleted file mode 100644 index 1dd83ab1..00000000 --- a/.kokoro/release/drop.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/release/drop.sh" -} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh deleted file mode 100755 index 742ec1a8..00000000 --- a/.kokoro/release/drop.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:drop -B \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg deleted file mode 100644 index 00042f4e..00000000 --- a/.kokoro/release/promote.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/release/promote.sh" -} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh deleted file mode 100755 index 3cac3d8a..00000000 --- a/.kokoro/release/promote.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh - -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:release -B \ - -DperformRelease=true \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg deleted file mode 100644 index 70f7f7a8..00000000 --- a/.kokoro/release/publish_javadoc.cfg +++ /dev/null @@ -1,23 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" - -env_vars: { - key: "STAGING_BUCKET" - value: "docs-staging" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/release/publish_javadoc.sh" -} - - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh deleted file mode 100755 index 2c9a0840..00000000 --- a/.kokoro/release/publish_javadoc.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET}" ]]; then - echo "Need to set STAGING_BUCKET environment variable" - exit 1 -fi - -# work from the git root directory -pushd $(dirname "$0")/../../ - -# install docuploader package -python3 -m pip install --require-hashes -r .kokoro/requirements.txt - -# compile all packages -mvn clean install -B -q -DskipTests=true - -export NAME=google-cloud-workflows -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# build the docs -mvn site -B -q - -pushd target/site/apidocs - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --language java - -# upload docs -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg deleted file mode 100644 index 0be16400..00000000 --- a/.kokoro/release/publish_javadoc11.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# cloud-rad production -env_vars: { - key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" -} - -# Configure the docker image for kokoro-trampoline -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/release/publish_javadoc11.sh" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} - -# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh deleted file mode 100755 index 569ee433..00000000 --- a/.kokoro/release/publish_javadoc11.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET_V2}" ]]; then - echo "Need to set STAGING_BUCKET_V2 environment variable" - exit 1 -fi - -# work from the git root directory -pushd $(dirname "$0")/../../ - -# install docuploader package -python3 -m pip install --require-hashes -r .kokoro/requirements.txt - -# compile all packages -mvn clean install -B -q -DskipTests=true - -export NAME=google-cloud-workflows -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# cloud RAD generation -mvn clean javadoc:aggregate -B -q -P docFX -# include CHANGELOG -cp CHANGELOG.md target/docfx-yml/history.md - -pushd target/docfx-yml - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --xrefs devsite://java/gax \ - --xrefs devsite://java/google-cloud-core \ - --xrefs devsite://java/api-common \ - --xrefs devsite://java/proto-google-common-protos \ - --xrefs devsite://java/google-api-client \ - --xrefs devsite://java/google-http-client \ - --xrefs devsite://java/protobuf \ - --language java - -# upload yml to production bucket -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET_V2} \ - --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg deleted file mode 100644 index 63a499c2..00000000 --- a/.kokoro/release/snapshot.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/release/snapshot.sh" -} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh deleted file mode 100755 index 1f55b770..00000000 --- a/.kokoro/release/snapshot.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -source $(dirname "$0")/common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml -pushd $(dirname "$0")/../../ - -# ensure we're trying to push a snapshot (no-result returns non-zero exit code) -grep SNAPSHOT versions.txt - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn clean deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg deleted file mode 100644 index d8e3267c..00000000 --- a/.kokoro/release/stage.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-workflows/.kokoro/release/stage.sh" -} - -# Need to save the properties file -action { - define_artifacts { - regex: "github/java-workflows/target/nexus-staging/staging/*.properties" - strip_prefix: "github/java-workflows" - } -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" -} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh deleted file mode 100755 index 61e714d6..00000000 --- a/.kokoro/release/stage.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# Start the releasetool reporter -requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) -python3 -m pip install --require-hashes -r $requirementsFile -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 \ - -Dclirr.skip=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 diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in deleted file mode 100644 index 6aa7cf2b..00000000 --- a/.kokoro/requirements.in +++ /dev/null @@ -1,33 +0,0 @@ -gcp-docuploader==0.6.3 -google-crc32c==1.3.0 -googleapis-common-protos==1.56.3 -gcp-releasetool==1.8.7 -cachetools==4.2.4 -cffi==1.15.1 -jeepney==0.7.1 -jinja2==3.0.3 -markupsafe==2.0.1 -keyring==23.4.1 -packaging==21.3 -protobuf==3.19.5 -pyjwt==2.4.0 -pyparsing==3.0.9 -pycparser==2.21 -pyperclip==1.8.2 -python-dateutil==2.8.2 -requests==2.27.1 -certifi==2022.9.24 -importlib-metadata==4.8.3 -zipp==3.6.0 -google_api_core==2.8.2 -google-cloud-storage==2.0.0 -google-resumable-media==2.3.3 -google-cloud-core==2.3.1 -typing-extensions==4.1.1 -urllib3==1.26.12 -zipp==3.6.0 -rsa==4.9 -six==1.16.0 -attrs==22.1.0 -google-auth==2.11.0 -idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt deleted file mode 100644 index 02ae42bb..00000000 --- a/.kokoro/requirements.txt +++ /dev/null @@ -1,456 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile --allow-unsafe --generate-hashes requirements.in -# -attrs==22.1.0 \ - --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ - --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c - # via - # -r requirements.in - # gcp-releasetool -cachetools==4.2.4 \ - --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ - --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 - # via - # -r requirements.in - # google-auth -certifi==2022.9.24 \ - --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ - --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 - # via - # -r requirements.in - # requests -cffi==1.15.1 \ - --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ - --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ - --hash=sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104 \ - --hash=sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426 \ - --hash=sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405 \ - --hash=sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375 \ - --hash=sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a \ - --hash=sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e \ - --hash=sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc \ - --hash=sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf \ - --hash=sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185 \ - --hash=sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497 \ - --hash=sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3 \ - --hash=sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35 \ - --hash=sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c \ - --hash=sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83 \ - --hash=sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21 \ - --hash=sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca \ - --hash=sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984 \ - --hash=sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac \ - --hash=sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd \ - --hash=sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee \ - --hash=sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a \ - --hash=sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2 \ - --hash=sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192 \ - --hash=sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7 \ - --hash=sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585 \ - --hash=sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f \ - --hash=sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e \ - --hash=sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27 \ - --hash=sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b \ - --hash=sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e \ - --hash=sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e \ - --hash=sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d \ - --hash=sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c \ - --hash=sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415 \ - --hash=sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82 \ - --hash=sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02 \ - --hash=sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314 \ - --hash=sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325 \ - --hash=sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c \ - --hash=sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3 \ - --hash=sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914 \ - --hash=sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045 \ - --hash=sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d \ - --hash=sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9 \ - --hash=sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5 \ - --hash=sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2 \ - --hash=sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c \ - --hash=sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3 \ - --hash=sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2 \ - --hash=sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8 \ - --hash=sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d \ - --hash=sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d \ - --hash=sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9 \ - --hash=sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162 \ - --hash=sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76 \ - --hash=sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4 \ - --hash=sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e \ - --hash=sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9 \ - --hash=sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6 \ - --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ - --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ - --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 - # via - # -r requirements.in - # cryptography -charset-normalizer==2.0.12 \ - --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ - --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df - # via requests -click==8.0.4 \ - --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ - --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb - # via - # gcp-docuploader - # gcp-releasetool -colorlog==6.7.0 \ - --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ - --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 - # via gcp-docuploader -cryptography==38.0.1 \ - --hash=sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a \ - --hash=sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f \ - --hash=sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0 \ - --hash=sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407 \ - --hash=sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 \ - --hash=sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6 \ - --hash=sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153 \ - --hash=sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750 \ - --hash=sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad \ - --hash=sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6 \ - --hash=sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b \ - --hash=sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5 \ - --hash=sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a \ - --hash=sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d \ - --hash=sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d \ - --hash=sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294 \ - --hash=sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0 \ - --hash=sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a \ - --hash=sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac \ - --hash=sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61 \ - --hash=sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013 \ - --hash=sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e \ - --hash=sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb \ - --hash=sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9 \ - --hash=sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd \ - --hash=sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818 - # via - # gcp-releasetool - # secretstorage -gcp-docuploader==0.6.3 \ - --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ - --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b - # via -r requirements.in -gcp-releasetool==1.8.7 \ - --hash=sha256:3d2a67c9db39322194afb3b427e9cb0476ce8f2a04033695f0aeb63979fc2b37 \ - --hash=sha256:5e4d28f66e90780d77f3ecf1e9155852b0c3b13cbccb08ab07e66b2357c8da8d - # via -r requirements.in -google-api-core==2.8.2 \ - --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ - --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 - # via - # -r requirements.in - # google-cloud-core - # google-cloud-storage -google-auth==2.11.0 \ - --hash=sha256:be62acaae38d0049c21ca90f27a23847245c9f161ff54ede13af2cb6afecbac9 \ - --hash=sha256:ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb - # via - # -r requirements.in - # gcp-releasetool - # google-api-core - # google-cloud-core - # google-cloud-storage -google-cloud-core==2.3.1 \ - --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ - --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 - # via - # -r requirements.in - # google-cloud-storage -google-cloud-storage==2.0.0 \ - --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ - --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 - # via - # -r requirements.in - # gcp-docuploader -google-crc32c==1.3.0 \ - --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ - --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ - --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ - --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ - --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ - --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ - --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ - --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ - --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ - --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ - --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ - --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ - --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ - --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ - --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ - --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ - --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ - --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ - --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ - --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ - --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ - --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ - --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ - --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ - --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ - --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ - --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ - --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ - --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ - --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ - --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ - --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ - --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ - --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ - --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ - --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ - --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ - --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ - --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ - --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ - --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ - --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ - --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 - # via - # -r requirements.in - # google-resumable-media -google-resumable-media==2.3.3 \ - --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ - --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 - # via - # -r requirements.in - # google-cloud-storage -googleapis-common-protos==1.56.3 \ - --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ - --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 - # via - # -r requirements.in - # google-api-core -idna==3.4 \ - --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ - --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 - # via - # -r requirements.in - # requests -importlib-metadata==4.8.3 \ - --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ - --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 - # via - # -r requirements.in - # keyring -jeepney==0.7.1 \ - --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ - --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f - # via - # -r requirements.in - # keyring - # secretstorage -jinja2==3.0.3 \ - --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ - --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 - # via - # -r requirements.in - # gcp-releasetool -keyring==23.4.1 \ - --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ - --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 - # via - # -r requirements.in - # gcp-releasetool -markupsafe==2.0.1 \ - --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ - --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ - --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ - --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ - --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ - --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ - --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ - --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ - --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ - --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ - --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ - --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ - --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ - --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ - --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ - --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ - --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ - --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ - --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ - --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ - --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ - --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ - --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ - --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ - --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ - --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ - --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ - --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ - --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ - --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ - --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ - --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ - --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ - --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ - --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ - --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ - --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ - --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ - --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ - --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ - --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ - --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ - --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ - --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ - --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ - --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ - --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ - --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ - --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ - --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ - --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ - --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ - --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ - --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ - --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ - --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ - --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ - --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ - --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ - --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ - --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ - --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ - --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ - --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ - --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ - --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ - --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ - --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ - --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 - # via - # -r requirements.in - # jinja2 -packaging==21.3 \ - --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ - --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 - # via - # -r requirements.in - # gcp-releasetool -protobuf==3.19.5 \ - --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ - --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ - --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ - --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ - --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ - --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ - --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ - --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ - --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ - --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ - --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ - --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ - --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ - --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ - --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ - --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ - --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ - --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ - --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ - --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ - --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ - --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ - --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ - --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ - --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ - --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de - # via - # -r requirements.in - # gcp-docuploader - # gcp-releasetool - # google-api-core - # google-cloud-storage - # googleapis-common-protos -pyasn1==0.4.8 \ - --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ - --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba - # via - # pyasn1-modules - # rsa -pyasn1-modules==0.2.8 \ - --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ - --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 - # via google-auth -pycparser==2.21 \ - --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ - --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 - # via - # -r requirements.in - # cffi -pyjwt==2.4.0 \ - --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ - --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba - # via - # -r requirements.in - # gcp-releasetool -pyparsing==3.0.9 \ - --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ - --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc - # via - # -r requirements.in - # packaging -pyperclip==1.8.2 \ - --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 - # via - # -r requirements.in - # gcp-releasetool -python-dateutil==2.8.2 \ - --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ - --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 - # via - # -r requirements.in - # gcp-releasetool -requests==2.27.1 \ - --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ - --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d - # via - # -r requirements.in - # gcp-releasetool - # google-api-core - # google-cloud-storage -rsa==4.9 \ - --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ - --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 - # via - # -r requirements.in - # google-auth -secretstorage==3.3.3 \ - --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ - --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 - # via keyring -six==1.16.0 \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via - # -r requirements.in - # gcp-docuploader - # google-auth - # python-dateutil -typing-extensions==4.1.1 \ - --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ - --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 - # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 - # via - # -r requirements.in - # requests -zipp==3.6.0 \ - --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ - --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc - # via - # -r requirements.in - # importlib-metadata diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh deleted file mode 100644 index 8b69b793..00000000 --- a/.kokoro/trampoline.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -set -eo pipefail -# Always run the cleanup script, regardless of the success of bouncing into -# the container. -function cleanup() { - chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - echo "cleanup"; -} -trap cleanup EXIT - -$(dirname $0)/populate-secrets.sh # Secret Manager secrets. -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json deleted file mode 100644 index 1cece97a..00000000 --- a/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_shortname": "workflows", - "name_pretty": "Cloud Workflows", - "product_documentation": "https://cloud.google.com/workflows", - "api_description": "allows you to ochestrate and automate Google Cloud and HTTP-based API services with serverless workflows.", - "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-workflows/latest/history", - "release_level": "stable", - "transport": "grpc", - "language": "java", - "repo": "googleapis/java-workflows", - "repo_short": "java-workflows", - "distribution_name": "com.google.cloud:google-cloud-workflows", - "api_id": "workflows.googleapis.com", - "requires_billing": true, - "library_type": "GAPIC_AUTO", - "codeowner_team": "@googleapis/aap-dpes" -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 2a53bd0d..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,359 +0,0 @@ -# Changelog - -## [2.3.6](https://github.com/googleapis/java-workflows/compare/v2.3.5...v2.3.6) (2022-10-05) - - -### Bug Fixes - -* update protobuf to v3.21.7 ([1801fe6](https://github.com/googleapis/java-workflows/commit/1801fe649d6ed1dae397e16c25a7954099cfd56b)) - -## [2.3.5](https://github.com/googleapis/java-workflows/compare/v2.3.4...v2.3.5) (2022-10-03) - - -### Dependencies - -* Update dependency certifi to v2022.9.24 ([#500](https://github.com/googleapis/java-workflows/issues/500)) ([a2f473d](https://github.com/googleapis/java-workflows/commit/a2f473d185597e87c26623a5061c9a7a77897256)) -* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#510](https://github.com/googleapis/java-workflows/issues/510)) ([d96993d](https://github.com/googleapis/java-workflows/commit/d96993d3b448e2b7e692755c4d4de07589b2ff2c)) -* Update dependency gcp-releasetool to v1.8.8 ([#501](https://github.com/googleapis/java-workflows/issues/501)) ([93c739b](https://github.com/googleapis/java-workflows/commit/93c739b003a5bbfa54c898f79ce97359125f029d)) -* Update dependency google-auth to v2.11.1 ([#502](https://github.com/googleapis/java-workflows/issues/502)) ([7bae540](https://github.com/googleapis/java-workflows/commit/7bae540d91e8f1fababcf109979e1933ce865fd8)) -* Update dependency googleapis-common-protos to v1.56.4 ([#504](https://github.com/googleapis/java-workflows/issues/504)) ([dc290f5](https://github.com/googleapis/java-workflows/commit/dc290f5f1d7fd6108ea18b2b38df0cdd0549c042)) -* Update dependency pyjwt to v2.5.0 ([#505](https://github.com/googleapis/java-workflows/issues/505)) ([2e04e11](https://github.com/googleapis/java-workflows/commit/2e04e11635a737038a758de03b4d7cb3aafbb609)) -* Update dependency requests to v2.28.1 ([#506](https://github.com/googleapis/java-workflows/issues/506)) ([6974473](https://github.com/googleapis/java-workflows/commit/6974473fc07943b6e94cff1a4186200c3afe905c)) - -## [2.3.4](https://github.com/googleapis/java-workflows/compare/v2.3.3...v2.3.4) (2022-09-15) - - -### Dependencies - -* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#494](https://github.com/googleapis/java-workflows/issues/494)) ([174b737](https://github.com/googleapis/java-workflows/commit/174b737e464cb6d06f52f60d8a5d90c99daa4112)) - -## [2.3.3](https://github.com/googleapis/java-workflows/compare/v2.3.2...v2.3.3) (2022-09-09) - - -### Dependencies - -* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#489](https://github.com/googleapis/java-workflows/issues/489)) ([6138420](https://github.com/googleapis/java-workflows/commit/61384202c7d421861502825488d9287f1984f5b0)) - -## [2.3.2](https://github.com/googleapis/java-workflows/compare/v2.3.1...v2.3.2) (2022-08-11) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#480](https://github.com/googleapis/java-workflows/issues/480)) ([b2f56c2](https://github.com/googleapis/java-workflows/commit/b2f56c2f75cf810cdb6e105378bbdff4211bbb4e)) - -## [2.3.1](https://github.com/googleapis/java-workflows/compare/v2.3.0...v2.3.1) (2022-07-13) - - -### Bug Fixes - -* enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-workflows/issues/1485)) ([#473](https://github.com/googleapis/java-workflows/issues/473)) ([7081d23](https://github.com/googleapis/java-workflows/commit/7081d23b71fbeefc6a7146b32579078f4ab38796)) - -## [2.3.0](https://github.com/googleapis/java-workflows/compare/v2.2.1...v2.3.0) (2022-07-01) - - -### Features - -* Enable REST transport for most of Java and Go clients ([503cc00](https://github.com/googleapis/java-workflows/commit/503cc00598e94741f72f4e25e82ab2768093350b)) - - -### Bug Fixes - -* update gapic-generator-java with mock service generation fixes ([#456](https://github.com/googleapis/java-workflows/issues/456)) ([503cc00](https://github.com/googleapis/java-workflows/commit/503cc00598e94741f72f4e25e82ab2768093350b)) - -## [2.2.1](https://github.com/googleapis/java-workflows/compare/v2.2.0...v2.2.1) (2022-06-23) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#462](https://github.com/googleapis/java-workflows/issues/462)) ([15bdfd9](https://github.com/googleapis/java-workflows/commit/15bdfd9dc5edbbd77a16de4d4fa6519a8f7117f3)) - -## [2.2.0](https://github.com/googleapis/java-workflows/compare/v2.1.10...v2.2.0) (2022-05-24) - - -### Features - -* add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/java-workflows/issues/1440)) ([#454](https://github.com/googleapis/java-workflows/issues/454)) ([5194c30](https://github.com/googleapis/java-workflows/commit/5194c303012675db89127e1581017ef7ecbda737)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.11.0 ([#453](https://github.com/googleapis/java-workflows/issues/453)) ([8241724](https://github.com/googleapis/java-workflows/commit/824172473845135eee1853aa9d9ccac096182328)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([#455](https://github.com/googleapis/java-workflows/issues/455)) ([3b68d9c](https://github.com/googleapis/java-workflows/commit/3b68d9ca4307fd34f913061363015decc73c1b23)) - -### [2.1.10](https://github.com/googleapis/java-workflows/compare/v2.1.9...v2.1.10) (2022-04-15) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#442](https://github.com/googleapis/java-workflows/issues/442)) ([f4fad72](https://github.com/googleapis/java-workflows/commit/f4fad72758fb2ff59ff5d3444a6c8ce287e18153)) - -### [2.1.9](https://github.com/googleapis/java-workflows/compare/v2.1.8...v2.1.9) (2022-03-29) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#436](https://github.com/googleapis/java-workflows/issues/436)) ([bb47b14](https://github.com/googleapis/java-workflows/commit/bb47b14f77e8246981a180e926fc2b8dff6d40f6)) - -### [2.1.8](https://github.com/googleapis/java-workflows/compare/v2.1.7...v2.1.8) (2022-03-02) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#428](https://github.com/googleapis/java-workflows/issues/428)) ([a2773ed](https://github.com/googleapis/java-workflows/commit/a2773edbcefd2dea0d8541ac82b9a2e86458ea41)) - -### [2.1.7](https://github.com/googleapis/java-workflows/compare/v2.1.6...v2.1.7) (2022-02-11) - - -### Dependencies - -* update actions/github-script action to v6 ([#415](https://github.com/googleapis/java-workflows/issues/415)) ([0b8a2c0](https://github.com/googleapis/java-workflows/commit/0b8a2c036739c6f8154699adb133e0574f10e495)) - -### [2.1.6](https://github.com/googleapis/java-workflows/compare/v2.1.5...v2.1.6) (2022-02-03) - - -### Dependencies - -* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-workflows/issues/1339)) ([#403](https://github.com/googleapis/java-workflows/issues/403)) ([e171805](https://github.com/googleapis/java-workflows/commit/e171805dfcdd621adcd60f6c4dafd58d0d897718)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 ([#406](https://github.com/googleapis/java-workflows/issues/406)) ([66d636f](https://github.com/googleapis/java-workflows/commit/66d636fda025b30c46929e3161d6d9afb726911b)) - -### [2.1.5](https://www.github.com/googleapis/java-workflows/compare/v2.1.4...v2.1.5) (2022-01-07) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 ([#389](https://www.github.com/googleapis/java-workflows/issues/389)) ([3f17bc2](https://www.github.com/googleapis/java-workflows/commit/3f17bc201e2e47ffeca90d84470fff7c2e1726c7)) - -### [2.1.4](https://www.github.com/googleapis/java-workflows/compare/v2.1.3...v2.1.4) (2021-12-06) - - -### Bug Fixes - -* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/java-workflows/issues/1299)) ([#383](https://www.github.com/googleapis/java-workflows/issues/383)) ([e612767](https://www.github.com/googleapis/java-workflows/commit/e612767a7e52094293963097cb0b74345634f947)) -* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-workflows/issues/1266)) ([#367](https://www.github.com/googleapis/java-workflows/issues/367)) ([b144e95](https://www.github.com/googleapis/java-workflows/commit/b144e95a151e31bc57f51096aebe6eb06d281b5d)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#376](https://www.github.com/googleapis/java-workflows/issues/376)) ([273fe9a](https://www.github.com/googleapis/java-workflows/commit/273fe9ae3b8190554320e916b7efd74d55d8123f)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#382](https://www.github.com/googleapis/java-workflows/issues/382)) ([f1260d1](https://www.github.com/googleapis/java-workflows/commit/f1260d1295703e54886ee6ecc0de3bb8db08a780)) - -### [2.1.3](https://www.github.com/googleapis/java-workflows/compare/v2.1.2...v2.1.3) (2021-10-20) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#361](https://www.github.com/googleapis/java-workflows/issues/361)) ([cf16a48](https://www.github.com/googleapis/java-workflows/commit/cf16a48f6bfc2dce29b061ab4ee74c4880008240)) - - -### Documentation - -* clarified format and semantics of service_account field ([fc2ba14](https://www.github.com/googleapis/java-workflows/commit/fc2ba141706b1aff0a089eec9050e1b71d5cd65d)) -* clarified when revision_id of a workflow is updated ([#362](https://www.github.com/googleapis/java-workflows/issues/362)) ([fc2ba14](https://www.github.com/googleapis/java-workflows/commit/fc2ba141706b1aff0a089eec9050e1b71d5cd65d)) -* documented expanded workflow size limit ([fc2ba14](https://www.github.com/googleapis/java-workflows/commit/fc2ba141706b1aff0a089eec9050e1b71d5cd65d)) - -### [2.1.2](https://www.github.com/googleapis/java-workflows/compare/v2.1.1...v2.1.2) (2021-09-22) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#348](https://www.github.com/googleapis/java-workflows/issues/348)) ([31f5b07](https://www.github.com/googleapis/java-workflows/commit/31f5b0764d0d0d4989ff32683ea878ded2dd6ef3)) - -### [2.1.1](https://www.github.com/googleapis/java-workflows/compare/v2.1.0...v2.1.1) (2021-09-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#341](https://www.github.com/googleapis/java-workflows/issues/341)) ([1e03836](https://www.github.com/googleapis/java-workflows/commit/1e0383668437594f9c18c933aa3e436754adef45)) - -## [2.1.0](https://www.github.com/googleapis/java-workflows/compare/v2.0.2...v2.1.0) (2021-09-01) - - -### Features - -* Remove use of deprecated gradle command in java README ([#1196](https://www.github.com/googleapis/java-workflows/issues/1196)) ([#327](https://www.github.com/googleapis/java-workflows/issues/327)) ([e3c82d9](https://www.github.com/googleapis/java-workflows/commit/e3c82d994db99e9d8606a25faa8f6d763b38d94f)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#329](https://www.github.com/googleapis/java-workflows/issues/329)) ([dfef32d](https://www.github.com/googleapis/java-workflows/commit/dfef32d14f3b5cf7cfc0b62b405f6ea67a637567)) - -### [2.0.2](https://www.github.com/googleapis/java-workflows/compare/v2.0.1...v2.0.2) (2021-08-23) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#321](https://www.github.com/googleapis/java-workflows/issues/321)) ([31e602d](https://www.github.com/googleapis/java-workflows/commit/31e602d45f192bcab7ec23f3c725f341d7e91579)) - -### [2.0.1](https://www.github.com/googleapis/java-workflows/compare/v2.0.0...v2.0.1) (2021-08-12) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.0.1 ([#315](https://www.github.com/googleapis/java-workflows/issues/315)) ([1b0cf41](https://www.github.com/googleapis/java-workflows/commit/1b0cf4196e205bf73e1bdf3f852111dca6010fdc)) - -## [2.0.0](https://www.github.com/googleapis/java-workflows/compare/v1.0.2...v2.0.0) (2021-08-06) - - -### ⚠ BREAKING CHANGES - -* release gapic-generator-java v2.0.0 (#308) - -### Features - -* release gapic-generator-java v2.0.0 ([#308](https://www.github.com/googleapis/java-workflows/issues/308)) ([4b2b88e](https://www.github.com/googleapis/java-workflows/commit/4b2b88e57de4fd2068a02bccd5e052a6e74f765c)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2 ([#309](https://www.github.com/googleapis/java-workflows/issues/309)) ([ad95ebd](https://www.github.com/googleapis/java-workflows/commit/ad95ebdeafffd92b8aaecf71cca9eaee87eba5db)) - -### [1.0.2](https://www.github.com/googleapis/java-workflows/compare/v1.0.1...v1.0.2) (2021-07-01) - - -### Bug Fixes - -* Add `shopt -s nullglob` to dependencies script ([#1130](https://www.github.com/googleapis/java-workflows/issues/1130)) ([#286](https://www.github.com/googleapis/java-workflows/issues/286)) ([df42c3c](https://www.github.com/googleapis/java-workflows/commit/df42c3c22823e02aa8052ccf0990bcbb7988113c)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 ([#288](https://www.github.com/googleapis/java-workflows/issues/288)) ([50107b9](https://www.github.com/googleapis/java-workflows/commit/50107b99f17961b4b805d31c37c033ab395a9748)) - -### [1.0.1](https://www.github.com/googleapis/java-workflows/compare/v1.0.0...v1.0.1) (2021-06-09) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.3.0 ([#274](https://www.github.com/googleapis/java-workflows/issues/274)) ([9161126](https://www.github.com/googleapis/java-workflows/commit/9161126021e5b54cea3090b6cad852dfc1760375)) - -## [1.0.0](https://www.github.com/googleapis/java-workflows/compare/v0.4.2...v1.0.0) (2021-05-26) - - -### Features - -* promote to 1.0.0 ([#267](https://www.github.com/googleapis/java-workflows/issues/267)) ([91404ce](https://www.github.com/googleapis/java-workflows/commit/91404cef3b9cef16c0e0c1e322a9eda0d4f80b24)) - -### [0.4.2](https://www.github.com/googleapis/java-workflows/compare/v0.4.1...v0.4.2) (2021-05-19) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#257](https://www.github.com/googleapis/java-workflows/issues/257)) ([7971ae3](https://www.github.com/googleapis/java-workflows/commit/7971ae3a74995fd995a49c09dea8d33cd97a6ab7)) - -### [0.4.1](https://www.github.com/googleapis/java-workflows/compare/v0.4.0...v0.4.1) (2021-05-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#249](https://www.github.com/googleapis/java-workflows/issues/249)) ([6c985db](https://www.github.com/googleapis/java-workflows/commit/6c985db4aaca7ba4a61edd3d27d4c02791b0f175)) - -## [0.4.0](https://www.github.com/googleapis/java-workflows/compare/v0.3.1...v0.4.0) (2021-04-29) - - -### Features - -* v1 client generation ([#240](https://www.github.com/googleapis/java-workflows/issues/240)) ([9619ec1](https://www.github.com/googleapis/java-workflows/commit/9619ec1badf86746f02ff7675cd0c1bebe77309b)) - - -### Bug Fixes - -* release scripts from issuing overlapping phases ([#234](https://www.github.com/googleapis/java-workflows/issues/234)) ([fd2ed80](https://www.github.com/googleapis/java-workflows/commit/fd2ed802a86e6899562669daa47453e717abc385)) -* typo ([#231](https://www.github.com/googleapis/java-workflows/issues/231)) ([6a883dc](https://www.github.com/googleapis/java-workflows/commit/6a883dc973f0ec59fca2049e8fcdb92f5ca06727)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#235](https://www.github.com/googleapis/java-workflows/issues/235)) ([4b610fa](https://www.github.com/googleapis/java-workflows/commit/4b610fa70529db33ca807c1332b03a71fc9eec02)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#238](https://www.github.com/googleapis/java-workflows/issues/238)) ([563e22b](https://www.github.com/googleapis/java-workflows/commit/563e22b476b3a495c05c392e929e436262caeca8)) - -### [0.3.1](https://www.github.com/googleapis/java-workflows/compare/v0.3.0...v0.3.1) (2021-04-09) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.0 ([#222](https://www.github.com/googleapis/java-workflows/issues/222)) ([f3abba3](https://www.github.com/googleapis/java-workflows/commit/f3abba3cd3ac823054bef16b7bb51adfab229987)) - -## [0.3.0](https://www.github.com/googleapis/java-workflows/compare/v0.2.1...v0.3.0) (2021-03-11) - - -### Features - -* **generator:** update protoc to v3.15.3 ([#203](https://www.github.com/googleapis/java-workflows/issues/203)) ([607f990](https://www.github.com/googleapis/java-workflows/commit/607f9904330c68f624c37d040e2ffc5ab735ef50)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.1 ([#211](https://www.github.com/googleapis/java-workflows/issues/211)) ([47a3bf4](https://www.github.com/googleapis/java-workflows/commit/47a3bf4d8f12110af1fe4571e661dc08656644cb)) - -### [0.2.1](https://www.github.com/googleapis/java-workflows/compare/v0.2.0...v0.2.1) (2021-02-25) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.20.0 ([#199](https://www.github.com/googleapis/java-workflows/issues/199)) ([fcf1074](https://www.github.com/googleapis/java-workflows/commit/fcf1074f31a17284685be2817e9f6e60448c8767)) - -## [0.2.0](https://www.github.com/googleapis/java-workflows/compare/v0.1.4...v0.2.0) (2021-02-22) - - -### Features - -* migrate to microgenerator ([#159](https://www.github.com/googleapis/java-workflows/issues/159)) ([fb32524](https://www.github.com/googleapis/java-workflows/commit/fb325248049da0109eb142107e91e0ae2b8ee39e)) - - -### Bug Fixes - -* update repo name ([#182](https://www.github.com/googleapis/java-workflows/issues/182)) ([529aa0e](https://www.github.com/googleapis/java-workflows/commit/529aa0e71150e7e6c1f99627e0bfc6c81b8a22dd)) - - -### Documentation - -* generate sample code in the Java microgenerator ([#185](https://www.github.com/googleapis/java-workflows/issues/185)) ([592501d](https://www.github.com/googleapis/java-workflows/commit/592501d6150886bf9531e669733f4dd3ed7f5fa8)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.0 ([#151](https://www.github.com/googleapis/java-workflows/issues/151)) ([a3003c8](https://www.github.com/googleapis/java-workflows/commit/a3003c8b601668c0e6b656aebf1fc1476083b4a2)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.16.1 ([ec15f27](https://www.github.com/googleapis/java-workflows/commit/ec15f2794dad3d9acfca3e9b7ccb876cd9be17f6)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.17.0 ([#166](https://www.github.com/googleapis/java-workflows/issues/166)) ([96e5909](https://www.github.com/googleapis/java-workflows/commit/96e5909d2ba0607e84df54f42df350a13a8eadf7)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.18.0 ([#171](https://www.github.com/googleapis/java-workflows/issues/171)) ([39e348c](https://www.github.com/googleapis/java-workflows/commit/39e348cb0012893da1a1fa37f00e28175928f0ce)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.19.0 ([#193](https://www.github.com/googleapis/java-workflows/issues/193)) ([098dbaa](https://www.github.com/googleapis/java-workflows/commit/098dbaaec94fe7fd9f0ea8c4a46c953a4dff2d70)) - -### [0.1.4](https://www.github.com/googleapis/java-workflows/compare/v0.1.3...v0.1.4) (2020-11-02) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.14.1 ([#114](https://www.github.com/googleapis/java-workflows/issues/114)) ([cc7ba2d](https://www.github.com/googleapis/java-workflows/commit/cc7ba2db20199bbffcf0e870454d30eac982fd12)) - -### [0.1.3](https://www.github.com/googleapis/java-workflows/compare/v0.1.2...v0.1.3) (2020-10-22) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#78](https://www.github.com/googleapis/java-workflows/issues/78)) ([90b5113](https://www.github.com/googleapis/java-workflows/commit/90b511372c1d80cde6673f0ac551a268aab4184c)) - -### [0.1.2](https://www.github.com/googleapis/java-workflows/compare/v0.1.1...v0.1.2) (2020-10-19) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#67](https://www.github.com/googleapis/java-workflows/issues/67)) ([a0b833a](https://www.github.com/googleapis/java-workflows/commit/a0b833afe2d2a34950bd00105cc0ddaad0e1c43b)) - -### [0.1.1](https://www.github.com/googleapis/java-workflows/compare/v0.1.0...v0.1.1) (2020-10-08) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#23](https://www.github.com/googleapis/java-workflows/issues/23)) ([e91cb1e](https://www.github.com/googleapis/java-workflows/commit/e91cb1e5659d75e0626ed2ea4422a556f3c5e48e)) - -## 0.1.0 (2020-10-01) - - -### Features - -* initial client generation ([42ce0b4](https://www.github.com/googleapis/java-workflows/commit/42ce0b46e60a653032e45642a6e96c5cbcd0b269)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.0 ([#15](https://www.github.com/googleapis/java-workflows/issues/15)) ([e396683](https://www.github.com/googleapis/java-workflows/commit/e39668313e4de72b37df3fbc20eefc0fbd4fa4ba)) diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 5724ea94..00000000 --- a/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com diff --git a/google-cloud-workflows-bom/pom.xml b/google-cloud-workflows-bom/pom.xml deleted file mode 100644 index 8754b29d..00000000 --- a/google-cloud-workflows-bom/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-workflows-bom - 2.3.7-SNAPSHOT - pom - - com.google.cloud - google-cloud-shared-config - 1.5.3 - - - Google Cloud Workflows BOM - https://github.com/googleapis/java-workflows - - BOM for Cloud Workflows - - - - Google LLC - - - - - chingor13 - Jeff Ching - chingor@google.com - Google LLC - - Developer - - - - - - scm:git:https://github.com/googleapis/java-workflows.git - scm:git:git@github.com:googleapis/java-workflows.git - https://github.com/googleapis/java-workflows - - - - true - - - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - - com.google.cloud - google-cloud-workflows - 2.3.7-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-workflows-v1beta - 0.9.7-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-workflows-v1 - 2.3.7-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-workflows-v1beta - 0.9.7-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-workflows-v1 - 2.3.7-SNAPSHOT - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - true - - - - - diff --git a/google-cloud-workflows/pom.xml b/google-cloud-workflows/pom.xml deleted file mode 100644 index 8bb96bae..00000000 --- a/google-cloud-workflows/pom.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-workflows - 2.3.7-SNAPSHOT - jar - Google Cloud Workflows - https://github.com/googleapis/java-workflows - allows you to ochestrate and automate Google Cloud and HTTP-based API services with serverless workflows. - - com.google.cloud - google-cloud-workflows-parent - 2.3.7-SNAPSHOT - - - google-cloud-workflows - - - - 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-workflows-v1 - - - com.google.api.grpc - proto-google-cloud-workflows-v1beta - - - com.google.guava - guava - - - com.google.api - gax - - - com.google.api - gax-grpc - - - com.google.api - gax-httpjson - - - org.threeten - threetenbp - - - - - junit - junit - test - 4.13.2 - - - - com.google.api.grpc - grpc-google-cloud-workflows-v1beta - test - - - com.google.api.grpc - grpc-google-cloud-workflows-v1 - test - - - - com.google.api - gax - testlib - test - - - com.google.api - gax-grpc - testlib - test - - - com.google.api - gax-httpjson - testlib - test - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/WorkflowsClient.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/WorkflowsClient.java deleted file mode 100644 index bae53fe0..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/WorkflowsClient.java +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.httpjson.longrunning.OperationsClient; -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.workflows.v1.stub.WorkflowsStub; -import com.google.cloud.workflows.v1.stub.WorkflowsStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -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: Workflows is used to deploy and execute workflow programs. Workflows makes - * sure the program executes reliably, despite hardware and networking interruptions. - * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
- *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
- *   Workflow response = workflowsClient.getWorkflow(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings workflowsSettings =
- *     WorkflowsSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings workflowsSettings =
- *     WorkflowsSettings.newBuilder().setEndpoint(myEndpoint).build();
- * WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings workflowsSettings =
- *     WorkflowsSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             WorkflowsSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class WorkflowsClient implements BackgroundResource { - private final WorkflowsSettings settings; - private final WorkflowsStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of WorkflowsClient with default settings. */ - public static final WorkflowsClient create() throws IOException { - return create(WorkflowsSettings.newBuilder().build()); - } - - /** - * Constructs an instance of WorkflowsClient, 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 WorkflowsClient create(WorkflowsSettings settings) throws IOException { - return new WorkflowsClient(settings); - } - - /** - * Constructs an instance of WorkflowsClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(WorkflowsSettings). - */ - public static final WorkflowsClient create(WorkflowsStub stub) { - return new WorkflowsClient(stub); - } - - /** - * Constructs an instance of WorkflowsClient, 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 WorkflowsClient(WorkflowsSettings settings) throws IOException { - this.settings = settings; - this.stub = ((WorkflowsStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected WorkflowsClient(WorkflowsStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final WorkflowsSettings getSettings() { - return settings; - } - - public WorkflowsStub 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 com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Project and location from which the workflows should be listed. Format: - * projects/{project}/locations/{location} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowsPagedResponse listWorkflows(LocationName parent) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listWorkflows(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Project and location from which the workflows should be listed. Format: - * projects/{project}/locations/{location} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowsPagedResponse listWorkflows(String parent) { - ListWorkflowsRequest request = ListWorkflowsRequest.newBuilder().setParent(parent).build(); - return listWorkflows(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   ListWorkflowsRequest request =
-   *       ListWorkflowsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   for (Workflow element : workflowsClient.listWorkflows(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 ListWorkflowsPagedResponse listWorkflows(ListWorkflowsRequest request) { - return listWorkflowsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   ListWorkflowsRequest request =
-   *       ListWorkflowsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future = workflowsClient.listWorkflowsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Workflow element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listWorkflowsPagedCallable() { - return stub.listWorkflowsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   ListWorkflowsRequest request =
-   *       ListWorkflowsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   while (true) {
-   *     ListWorkflowsResponse response = workflowsClient.listWorkflowsCallable().call(request);
-   *     for (Workflow element : response.getWorkflowsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listWorkflowsCallable() { - return stub.listWorkflowsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
-   *   Workflow response = workflowsClient.getWorkflow(name);
-   * }
-   * }
- * - * @param name Required. Name of the workflow which information should be retrieved. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Workflow getWorkflow(WorkflowName name) { - GetWorkflowRequest request = - GetWorkflowRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getWorkflow(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString();
-   *   Workflow response = workflowsClient.getWorkflow(name);
-   * }
-   * }
- * - * @param name Required. Name of the workflow which information should be retrieved. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Workflow getWorkflow(String name) { - GetWorkflowRequest request = GetWorkflowRequest.newBuilder().setName(name).build(); - return getWorkflow(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   GetWorkflowRequest request =
-   *       GetWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   Workflow response = workflowsClient.getWorkflow(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 Workflow getWorkflow(GetWorkflowRequest request) { - return getWorkflowCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   GetWorkflowRequest request =
-   *       GetWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   ApiFuture future = workflowsClient.getWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   Workflow response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getWorkflowCallable() { - return stub.getWorkflowCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Workflow workflow = Workflow.newBuilder().build();
-   *   String workflowId = "workflowId-360387270";
-   *   Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get();
-   * }
-   * }
- * - * @param parent Required. Project and location in which the workflow should be created. Format: - * projects/{project}/locations/{location} - * @param workflow Required. Workflow to be created. - * @param workflowId Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - *
    - *
  • Must contain only letters, numbers, underscores and hyphens. - *
  • Must start with a letter. - *
  • Must be between 1-64 characters. - *
  • Must end with a number or a letter. - *
  • Must be unique within the customer project and location. - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createWorkflowAsync( - LocationName parent, Workflow workflow, String workflowId) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setWorkflow(workflow) - .setWorkflowId(workflowId) - .build(); - return createWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Workflow workflow = Workflow.newBuilder().build();
-   *   String workflowId = "workflowId-360387270";
-   *   Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get();
-   * }
-   * }
- * - * @param parent Required. Project and location in which the workflow should be created. Format: - * projects/{project}/locations/{location} - * @param workflow Required. Workflow to be created. - * @param workflowId Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - *
    - *
  • Must contain only letters, numbers, underscores and hyphens. - *
  • Must start with a letter. - *
  • Must be between 1-64 characters. - *
  • Must end with a number or a letter. - *
  • Must be unique within the customer project and location. - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createWorkflowAsync( - String parent, Workflow workflow, String workflowId) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(parent) - .setWorkflow(workflow) - .setWorkflowId(workflowId) - .build(); - return createWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   CreateWorkflowRequest request =
-   *       CreateWorkflowRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setWorkflowId("workflowId-360387270")
-   *           .build();
-   *   Workflow response = workflowsClient.createWorkflowAsync(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 createWorkflowAsync( - CreateWorkflowRequest request) { - return createWorkflowOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   CreateWorkflowRequest request =
-   *       CreateWorkflowRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setWorkflowId("workflowId-360387270")
-   *           .build();
-   *   OperationFuture future =
-   *       workflowsClient.createWorkflowOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Workflow response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createWorkflowOperationCallable() { - return stub.createWorkflowOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   CreateWorkflowRequest request =
-   *       CreateWorkflowRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setWorkflowId("workflowId-360387270")
-   *           .build();
-   *   ApiFuture future = workflowsClient.createWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createWorkflowCallable() { - return stub.createWorkflowCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
-   *   workflowsClient.deleteWorkflowAsync(name).get();
-   * }
-   * }
- * - * @param name Required. Name of the workflow to be deleted. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteWorkflowAsync(WorkflowName name) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString();
-   *   workflowsClient.deleteWorkflowAsync(name).get();
-   * }
-   * }
- * - * @param name Required. Name of the workflow to be deleted. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteWorkflowAsync(String name) { - DeleteWorkflowRequest request = DeleteWorkflowRequest.newBuilder().setName(name).build(); - return deleteWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   DeleteWorkflowRequest request =
-   *       DeleteWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   workflowsClient.deleteWorkflowAsync(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 deleteWorkflowAsync( - DeleteWorkflowRequest request) { - return deleteWorkflowOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   DeleteWorkflowRequest request =
-   *       DeleteWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       workflowsClient.deleteWorkflowOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteWorkflowOperationCallable() { - return stub.deleteWorkflowOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   DeleteWorkflowRequest request =
-   *       DeleteWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   ApiFuture future = workflowsClient.deleteWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteWorkflowCallable() { - return stub.deleteWorkflowCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   Workflow workflow = Workflow.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Workflow response = workflowsClient.updateWorkflowAsync(workflow, updateMask).get();
-   * }
-   * }
- * - * @param workflow Required. Workflow to be updated. - * @param updateMask List of fields to be updated. If not present, the entire workflow will be - * updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture updateWorkflowAsync( - Workflow workflow, FieldMask updateMask) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder().setWorkflow(workflow).setUpdateMask(updateMask).build(); - return updateWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   UpdateWorkflowRequest request =
-   *       UpdateWorkflowRequest.newBuilder()
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Workflow response = workflowsClient.updateWorkflowAsync(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 updateWorkflowAsync( - UpdateWorkflowRequest request) { - return updateWorkflowOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   UpdateWorkflowRequest request =
-   *       UpdateWorkflowRequest.newBuilder()
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       workflowsClient.updateWorkflowOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Workflow response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateWorkflowOperationCallable() { - return stub.updateWorkflowOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   UpdateWorkflowRequest request =
-   *       UpdateWorkflowRequest.newBuilder()
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = workflowsClient.updateWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateWorkflowCallable() { - return stub.updateWorkflowCallable(); - } - - @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 ListWorkflowsPagedResponse - extends AbstractPagedListResponse< - ListWorkflowsRequest, - ListWorkflowsResponse, - Workflow, - ListWorkflowsPage, - ListWorkflowsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListWorkflowsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListWorkflowsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListWorkflowsPagedResponse(ListWorkflowsPage page) { - super(page, ListWorkflowsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListWorkflowsPage - extends AbstractPage< - ListWorkflowsRequest, ListWorkflowsResponse, Workflow, ListWorkflowsPage> { - - private ListWorkflowsPage( - PageContext context, - ListWorkflowsResponse response) { - super(context, response); - } - - private static ListWorkflowsPage createEmptyPage() { - return new ListWorkflowsPage(null, null); - } - - @Override - protected ListWorkflowsPage createPage( - PageContext context, - ListWorkflowsResponse response) { - return new ListWorkflowsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListWorkflowsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListWorkflowsRequest, - ListWorkflowsResponse, - Workflow, - ListWorkflowsPage, - ListWorkflowsFixedSizeCollection> { - - private ListWorkflowsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListWorkflowsFixedSizeCollection createEmptyCollection() { - return new ListWorkflowsFixedSizeCollection(null, 0); - } - - @Override - protected ListWorkflowsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListWorkflowsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/WorkflowsSettings.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/WorkflowsSettings.java deleted file mode 100644 index 6fd10490..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/WorkflowsSettings.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -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.httpjson.InstantiatingHttpJsonChannelProvider; -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.workflows.v1.stub.WorkflowsStubSettings; -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 WorkflowsClient}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings.Builder workflowsSettingsBuilder = WorkflowsSettings.newBuilder();
- * workflowsSettingsBuilder
- *     .getWorkflowSettings()
- *     .setRetrySettings(
- *         workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * WorkflowsSettings workflowsSettings = workflowsSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class WorkflowsSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listWorkflows. */ - public PagedCallSettings - listWorkflowsSettings() { - return ((WorkflowsStubSettings) getStubSettings()).listWorkflowsSettings(); - } - - /** Returns the object with the settings used for calls to getWorkflow. */ - public UnaryCallSettings getWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).getWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public UnaryCallSettings createWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).createWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public OperationCallSettings - createWorkflowOperationSettings() { - return ((WorkflowsStubSettings) getStubSettings()).createWorkflowOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings deleteWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).deleteWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public OperationCallSettings - deleteWorkflowOperationSettings() { - return ((WorkflowsStubSettings) getStubSettings()).deleteWorkflowOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public UnaryCallSettings updateWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).updateWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public OperationCallSettings - updateWorkflowOperationSettings() { - return ((WorkflowsStubSettings) getStubSettings()).updateWorkflowOperationSettings(); - } - - public static final WorkflowsSettings create(WorkflowsStubSettings stub) throws IOException { - return new WorkflowsSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return WorkflowsStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return WorkflowsStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return WorkflowsStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return WorkflowsStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return WorkflowsStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return WorkflowsStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return WorkflowsStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return WorkflowsStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 WorkflowsSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for WorkflowsSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(WorkflowsStubSettings.newBuilder(clientContext)); - } - - protected Builder(WorkflowsSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(WorkflowsStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(WorkflowsStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(WorkflowsStubSettings.newHttpJsonBuilder()); - } - - public WorkflowsStubSettings.Builder getStubSettingsBuilder() { - return ((WorkflowsStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listWorkflows. */ - public PagedCallSettings.Builder< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings() { - return getStubSettingsBuilder().listWorkflowsSettings(); - } - - /** Returns the builder for the settings used for calls to getWorkflow. */ - public UnaryCallSettings.Builder getWorkflowSettings() { - return getStubSettingsBuilder().getWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - public UnaryCallSettings.Builder createWorkflowSettings() { - return getStubSettingsBuilder().createWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - public OperationCallSettings.Builder - createWorkflowOperationSettings() { - return getStubSettingsBuilder().createWorkflowOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings.Builder deleteWorkflowSettings() { - return getStubSettingsBuilder().deleteWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - public OperationCallSettings.Builder - deleteWorkflowOperationSettings() { - return getStubSettingsBuilder().deleteWorkflowOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - public UnaryCallSettings.Builder updateWorkflowSettings() { - return getStubSettingsBuilder().updateWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - public OperationCallSettings.Builder - updateWorkflowOperationSettings() { - return getStubSettingsBuilder().updateWorkflowOperationSettings(); - } - - @Override - public WorkflowsSettings build() throws IOException { - return new WorkflowsSettings(this); - } - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/gapic_metadata.json b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/gapic_metadata.json deleted file mode 100644 index 35bcd2f0..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.workflows.v1", - "libraryPackage": "com.google.cloud.workflows.v1", - "services": { - "Workflows": { - "clients": { - "grpc": { - "libraryClient": "WorkflowsClient", - "rpcs": { - "CreateWorkflow": { - "methods": ["createWorkflowAsync", "createWorkflowAsync", "createWorkflowAsync", "createWorkflowOperationCallable", "createWorkflowCallable"] - }, - "DeleteWorkflow": { - "methods": ["deleteWorkflowAsync", "deleteWorkflowAsync", "deleteWorkflowAsync", "deleteWorkflowOperationCallable", "deleteWorkflowCallable"] - }, - "GetWorkflow": { - "methods": ["getWorkflow", "getWorkflow", "getWorkflow", "getWorkflowCallable"] - }, - "ListWorkflows": { - "methods": ["listWorkflows", "listWorkflows", "listWorkflows", "listWorkflowsPagedCallable", "listWorkflowsCallable"] - }, - "UpdateWorkflow": { - "methods": ["updateWorkflowAsync", "updateWorkflowAsync", "updateWorkflowOperationCallable", "updateWorkflowCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/package-info.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/package-info.java deleted file mode 100644 index b4ac1ccb..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/package-info.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Workflows API - * - *

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

======================= WorkflowsClient ======================= - * - *

Service Description: Workflows is used to deploy and execute workflow programs. Workflows - * makes sure the program executes reliably, despite hardware and networking interruptions. - * - *

Sample for WorkflowsClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
- *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
- *   Workflow response = workflowsClient.getWorkflow(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.workflows.v1; - -import javax.annotation.Generated; diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/GrpcWorkflowsCallableFactory.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/GrpcWorkflowsCallableFactory.java deleted file mode 100644 index d90ca4b8..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/GrpcWorkflowsCallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.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 Workflows service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcWorkflowsCallableFactory 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-workflows/src/main/java/com/google/cloud/workflows/v1/stub/GrpcWorkflowsStub.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/GrpcWorkflowsStub.java deleted file mode 100644 index 8f43fc0e..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/GrpcWorkflowsStub.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.stub; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.GetWorkflowRequest; -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.ListWorkflowsResponse; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Workflows service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcWorkflowsStub extends WorkflowsStub { - private static final MethodDescriptor - listWorkflowsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1.Workflows/ListWorkflows") - .setRequestMarshaller( - ProtoUtils.marshaller(ListWorkflowsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListWorkflowsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1.Workflows/GetWorkflow") - .setRequestMarshaller(ProtoUtils.marshaller(GetWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Workflow.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1.Workflows/CreateWorkflow") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1.Workflows/DeleteWorkflow") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1.Workflows/UpdateWorkflow") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listWorkflowsCallable; - private final UnaryCallable - listWorkflowsPagedCallable; - private final UnaryCallable getWorkflowCallable; - private final UnaryCallable createWorkflowCallable; - private final OperationCallable - createWorkflowOperationCallable; - private final UnaryCallable deleteWorkflowCallable; - private final OperationCallable - deleteWorkflowOperationCallable; - private final UnaryCallable updateWorkflowCallable; - private final OperationCallable - updateWorkflowOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcWorkflowsStub create(WorkflowsStubSettings settings) throws IOException { - return new GrpcWorkflowsStub(settings, ClientContext.create(settings)); - } - - public static final GrpcWorkflowsStub create(ClientContext clientContext) throws IOException { - return new GrpcWorkflowsStub(WorkflowsStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcWorkflowsStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcWorkflowsStub( - WorkflowsStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcWorkflowsStub, 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 GrpcWorkflowsStub(WorkflowsStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcWorkflowsCallableFactory()); - } - - /** - * Constructs an instance of GrpcWorkflowsStub, 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 GrpcWorkflowsStub( - WorkflowsStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listWorkflowsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listWorkflowsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("workflow.name", String.valueOf(request.getWorkflow().getName())); - return params.build(); - }) - .build(); - - this.listWorkflowsCallable = - callableFactory.createUnaryCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.listWorkflowsPagedCallable = - callableFactory.createPagedCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.getWorkflowCallable = - callableFactory.createUnaryCallable( - getWorkflowTransportSettings, settings.getWorkflowSettings(), clientContext); - this.createWorkflowCallable = - callableFactory.createUnaryCallable( - createWorkflowTransportSettings, settings.createWorkflowSettings(), clientContext); - this.createWorkflowOperationCallable = - callableFactory.createOperationCallable( - createWorkflowTransportSettings, - settings.createWorkflowOperationSettings(), - clientContext, - operationsStub); - this.deleteWorkflowCallable = - callableFactory.createUnaryCallable( - deleteWorkflowTransportSettings, settings.deleteWorkflowSettings(), clientContext); - this.deleteWorkflowOperationCallable = - callableFactory.createOperationCallable( - deleteWorkflowTransportSettings, - settings.deleteWorkflowOperationSettings(), - clientContext, - operationsStub); - this.updateWorkflowCallable = - callableFactory.createUnaryCallable( - updateWorkflowTransportSettings, settings.updateWorkflowSettings(), clientContext); - this.updateWorkflowOperationCallable = - callableFactory.createOperationCallable( - updateWorkflowTransportSettings, - settings.updateWorkflowOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listWorkflowsCallable() { - return listWorkflowsCallable; - } - - @Override - public UnaryCallable - listWorkflowsPagedCallable() { - return listWorkflowsPagedCallable; - } - - @Override - public UnaryCallable getWorkflowCallable() { - return getWorkflowCallable; - } - - @Override - public UnaryCallable createWorkflowCallable() { - return createWorkflowCallable; - } - - @Override - public OperationCallable - createWorkflowOperationCallable() { - return createWorkflowOperationCallable; - } - - @Override - public UnaryCallable deleteWorkflowCallable() { - return deleteWorkflowCallable; - } - - @Override - public OperationCallable - deleteWorkflowOperationCallable() { - return deleteWorkflowOperationCallable; - } - - @Override - public UnaryCallable updateWorkflowCallable() { - return updateWorkflowCallable; - } - - @Override - public OperationCallable - updateWorkflowOperationCallable() { - return updateWorkflowOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/HttpJsonWorkflowsCallableFactory.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/HttpJsonWorkflowsCallableFactory.java deleted file mode 100644 index dbed8e36..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/HttpJsonWorkflowsCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the Workflows service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonWorkflowsCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/HttpJsonWorkflowsStub.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/HttpJsonWorkflowsStub.java deleted file mode 100644 index 9979d2b1..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/HttpJsonWorkflowsStub.java +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.stub; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.GetWorkflowRequest; -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.ListWorkflowsResponse; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the Workflows service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonWorkflowsStub extends WorkflowsStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(Workflow.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listWorkflowsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1.Workflows/ListWorkflows") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/workflows", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListWorkflowsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1.Workflows/GetWorkflow") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/workflows/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Workflow.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1.Workflows/CreateWorkflow") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*/locations/*}/workflows", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "workflowId", request.getWorkflowId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("workflow", request.getWorkflow(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateWorkflowRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1.Workflows/DeleteWorkflow") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/locations/*/workflows/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteWorkflowRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1.Workflows/UpdateWorkflow") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{workflow.name=projects/*/locations/*/workflows/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "workflow.name", request.getWorkflow().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("workflow", request.getWorkflow(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateWorkflowRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listWorkflowsCallable; - private final UnaryCallable - listWorkflowsPagedCallable; - private final UnaryCallable getWorkflowCallable; - private final UnaryCallable createWorkflowCallable; - private final OperationCallable - createWorkflowOperationCallable; - private final UnaryCallable deleteWorkflowCallable; - private final OperationCallable - deleteWorkflowOperationCallable; - private final UnaryCallable updateWorkflowCallable; - private final OperationCallable - updateWorkflowOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonWorkflowsStub create(WorkflowsStubSettings settings) - throws IOException { - return new HttpJsonWorkflowsStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonWorkflowsStub create(ClientContext clientContext) throws IOException { - return new HttpJsonWorkflowsStub( - WorkflowsStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonWorkflowsStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonWorkflowsStub( - WorkflowsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonWorkflowsStub, 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 HttpJsonWorkflowsStub(WorkflowsStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonWorkflowsCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonWorkflowsStub, 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 HttpJsonWorkflowsStub( - WorkflowsStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings - listWorkflowsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listWorkflowsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listWorkflowsCallable = - callableFactory.createUnaryCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.listWorkflowsPagedCallable = - callableFactory.createPagedCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.getWorkflowCallable = - callableFactory.createUnaryCallable( - getWorkflowTransportSettings, settings.getWorkflowSettings(), clientContext); - this.createWorkflowCallable = - callableFactory.createUnaryCallable( - createWorkflowTransportSettings, settings.createWorkflowSettings(), clientContext); - this.createWorkflowOperationCallable = - callableFactory.createOperationCallable( - createWorkflowTransportSettings, - settings.createWorkflowOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteWorkflowCallable = - callableFactory.createUnaryCallable( - deleteWorkflowTransportSettings, settings.deleteWorkflowSettings(), clientContext); - this.deleteWorkflowOperationCallable = - callableFactory.createOperationCallable( - deleteWorkflowTransportSettings, - settings.deleteWorkflowOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateWorkflowCallable = - callableFactory.createUnaryCallable( - updateWorkflowTransportSettings, settings.updateWorkflowSettings(), clientContext); - this.updateWorkflowOperationCallable = - callableFactory.createOperationCallable( - updateWorkflowTransportSettings, - settings.updateWorkflowOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listWorkflowsMethodDescriptor); - methodDescriptors.add(getWorkflowMethodDescriptor); - methodDescriptors.add(createWorkflowMethodDescriptor); - methodDescriptors.add(deleteWorkflowMethodDescriptor); - methodDescriptors.add(updateWorkflowMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listWorkflowsCallable() { - return listWorkflowsCallable; - } - - @Override - public UnaryCallable - listWorkflowsPagedCallable() { - return listWorkflowsPagedCallable; - } - - @Override - public UnaryCallable getWorkflowCallable() { - return getWorkflowCallable; - } - - @Override - public UnaryCallable createWorkflowCallable() { - return createWorkflowCallable; - } - - @Override - public OperationCallable - createWorkflowOperationCallable() { - return createWorkflowOperationCallable; - } - - @Override - public UnaryCallable deleteWorkflowCallable() { - return deleteWorkflowCallable; - } - - @Override - public OperationCallable - deleteWorkflowOperationCallable() { - return deleteWorkflowOperationCallable; - } - - @Override - public UnaryCallable updateWorkflowCallable() { - return updateWorkflowCallable; - } - - @Override - public OperationCallable - updateWorkflowOperationCallable() { - return updateWorkflowOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/WorkflowsStub.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/WorkflowsStub.java deleted file mode 100644 index 6eef508d..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/WorkflowsStub.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.stub; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -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.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.GetWorkflowRequest; -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.ListWorkflowsResponse; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -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 Workflows service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class WorkflowsStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - listWorkflowsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listWorkflowsPagedCallable()"); - } - - public UnaryCallable listWorkflowsCallable() { - throw new UnsupportedOperationException("Not implemented: listWorkflowsCallable()"); - } - - public UnaryCallable getWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: getWorkflowCallable()"); - } - - public OperationCallable - createWorkflowOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowOperationCallable()"); - } - - public UnaryCallable createWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowCallable()"); - } - - public OperationCallable - deleteWorkflowOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteWorkflowOperationCallable()"); - } - - public UnaryCallable deleteWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: deleteWorkflowCallable()"); - } - - public OperationCallable - updateWorkflowOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateWorkflowOperationCallable()"); - } - - public UnaryCallable updateWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: updateWorkflowCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/WorkflowsStubSettings.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/WorkflowsStubSettings.java deleted file mode 100644 index 17588eab..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1/stub/WorkflowsStubSettings.java +++ /dev/null @@ -1,617 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.stub; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -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.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -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.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.GetWorkflowRequest; -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.ListWorkflowsResponse; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -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 WorkflowsStub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsStubSettings.Builder workflowsSettingsBuilder = WorkflowsStubSettings.newBuilder();
- * workflowsSettingsBuilder
- *     .getWorkflowSettings()
- *     .setRetrySettings(
- *         workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * WorkflowsStubSettings workflowsSettings = workflowsSettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class WorkflowsStubSettings 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< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings; - private final UnaryCallSettings getWorkflowSettings; - private final UnaryCallSettings createWorkflowSettings; - private final OperationCallSettings - createWorkflowOperationSettings; - private final UnaryCallSettings deleteWorkflowSettings; - private final OperationCallSettings - deleteWorkflowOperationSettings; - private final UnaryCallSettings updateWorkflowSettings; - private final OperationCallSettings - updateWorkflowOperationSettings; - - private static final PagedListDescriptor - LIST_WORKFLOWS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListWorkflowsRequest injectToken(ListWorkflowsRequest payload, String token) { - return ListWorkflowsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListWorkflowsRequest injectPageSize(ListWorkflowsRequest payload, int pageSize) { - return ListWorkflowsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListWorkflowsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListWorkflowsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListWorkflowsResponse payload) { - return payload.getWorkflowsList() == null - ? ImmutableList.of() - : payload.getWorkflowsList(); - } - }; - - private static final PagedListResponseFactory< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - LIST_WORKFLOWS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListWorkflowsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_WORKFLOWS_PAGE_STR_DESC, request, context); - return ListWorkflowsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listWorkflows. */ - public PagedCallSettings - listWorkflowsSettings() { - return listWorkflowsSettings; - } - - /** Returns the object with the settings used for calls to getWorkflow. */ - public UnaryCallSettings getWorkflowSettings() { - return getWorkflowSettings; - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public UnaryCallSettings createWorkflowSettings() { - return createWorkflowSettings; - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public OperationCallSettings - createWorkflowOperationSettings() { - return createWorkflowOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings deleteWorkflowSettings() { - return deleteWorkflowSettings; - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public OperationCallSettings - deleteWorkflowOperationSettings() { - return deleteWorkflowOperationSettings; - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public UnaryCallSettings updateWorkflowSettings() { - return updateWorkflowSettings; - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public OperationCallSettings - updateWorkflowOperationSettings() { - return updateWorkflowOperationSettings; - } - - public WorkflowsStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcWorkflowsStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonWorkflowsStub.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 "workflows.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "workflows.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(WorkflowsStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(WorkflowsStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return WorkflowsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 WorkflowsStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listWorkflowsSettings = settingsBuilder.listWorkflowsSettings().build(); - getWorkflowSettings = settingsBuilder.getWorkflowSettings().build(); - createWorkflowSettings = settingsBuilder.createWorkflowSettings().build(); - createWorkflowOperationSettings = settingsBuilder.createWorkflowOperationSettings().build(); - deleteWorkflowSettings = settingsBuilder.deleteWorkflowSettings().build(); - deleteWorkflowOperationSettings = settingsBuilder.deleteWorkflowOperationSettings().build(); - updateWorkflowSettings = settingsBuilder.updateWorkflowSettings().build(); - updateWorkflowOperationSettings = settingsBuilder.updateWorkflowOperationSettings().build(); - } - - /** Builder for WorkflowsStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings; - private final UnaryCallSettings.Builder getWorkflowSettings; - private final UnaryCallSettings.Builder - createWorkflowSettings; - private final OperationCallSettings.Builder - createWorkflowOperationSettings; - private final UnaryCallSettings.Builder - deleteWorkflowSettings; - private final OperationCallSettings.Builder - deleteWorkflowOperationSettings; - private final UnaryCallSettings.Builder - updateWorkflowSettings; - private final OperationCallSettings.Builder - updateWorkflowOperationSettings; - 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); - - listWorkflowsSettings = PagedCallSettings.newBuilder(LIST_WORKFLOWS_PAGE_STR_FACT); - getWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createWorkflowOperationSettings = OperationCallSettings.newBuilder(); - deleteWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteWorkflowOperationSettings = OperationCallSettings.newBuilder(); - updateWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateWorkflowOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listWorkflowsSettings, - getWorkflowSettings, - createWorkflowSettings, - deleteWorkflowSettings, - updateWorkflowSettings); - initDefaults(this); - } - - protected Builder(WorkflowsStubSettings settings) { - super(settings); - - listWorkflowsSettings = settings.listWorkflowsSettings.toBuilder(); - getWorkflowSettings = settings.getWorkflowSettings.toBuilder(); - createWorkflowSettings = settings.createWorkflowSettings.toBuilder(); - createWorkflowOperationSettings = settings.createWorkflowOperationSettings.toBuilder(); - deleteWorkflowSettings = settings.deleteWorkflowSettings.toBuilder(); - deleteWorkflowOperationSettings = settings.deleteWorkflowOperationSettings.toBuilder(); - updateWorkflowSettings = settings.updateWorkflowSettings.toBuilder(); - updateWorkflowOperationSettings = settings.updateWorkflowOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listWorkflowsSettings, - getWorkflowSettings, - createWorkflowSettings, - deleteWorkflowSettings, - updateWorkflowSettings); - } - - 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 createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listWorkflowsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createWorkflowOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Workflow.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 - .deleteWorkflowOperationSettings() - .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 - .updateWorkflowOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Workflow.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; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listWorkflows. */ - public PagedCallSettings.Builder< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings() { - return listWorkflowsSettings; - } - - /** Returns the builder for the settings used for calls to getWorkflow. */ - public UnaryCallSettings.Builder getWorkflowSettings() { - return getWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - public UnaryCallSettings.Builder createWorkflowSettings() { - return createWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createWorkflowOperationSettings() { - return createWorkflowOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings.Builder deleteWorkflowSettings() { - return deleteWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteWorkflowOperationSettings() { - return deleteWorkflowOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - public UnaryCallSettings.Builder updateWorkflowSettings() { - return updateWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateWorkflowOperationSettings() { - return updateWorkflowOperationSettings; - } - - @Override - public WorkflowsStubSettings build() throws IOException { - return new WorkflowsStubSettings(this); - } - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsClient.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsClient.java deleted file mode 100644 index 7e6c5b02..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsClient.java +++ /dev/null @@ -1,1058 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -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.httpjson.longrunning.OperationsClient; -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.workflows.v1beta.stub.WorkflowsStub; -import com.google.cloud.workflows.v1beta.stub.WorkflowsStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -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: Workflows is used to deploy and execute workflow programs. Workflows makes - * sure the program executes reliably, despite hardware and networking interruptions. - * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
- *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
- *   Workflow response = workflowsClient.getWorkflow(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings workflowsSettings =
- *     WorkflowsSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings workflowsSettings =
- *     WorkflowsSettings.newBuilder().setEndpoint(myEndpoint).build();
- * WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings workflowsSettings =
- *     WorkflowsSettings.newBuilder()
- *         .setTransportChannelProvider(
- *             WorkflowsSettings.defaultHttpJsonTransportProviderBuilder().build())
- *         .build();
- * WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class WorkflowsClient implements BackgroundResource { - private final WorkflowsSettings settings; - private final WorkflowsStub stub; - private final OperationsClient httpJsonOperationsClient; - private final com.google.longrunning.OperationsClient operationsClient; - - /** Constructs an instance of WorkflowsClient with default settings. */ - public static final WorkflowsClient create() throws IOException { - return create(WorkflowsSettings.newBuilder().build()); - } - - /** - * Constructs an instance of WorkflowsClient, 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 WorkflowsClient create(WorkflowsSettings settings) throws IOException { - return new WorkflowsClient(settings); - } - - /** - * Constructs an instance of WorkflowsClient, using the given stub for making calls. This is for - * advanced usage - prefer using create(WorkflowsSettings). - */ - public static final WorkflowsClient create(WorkflowsStub stub) { - return new WorkflowsClient(stub); - } - - /** - * Constructs an instance of WorkflowsClient, 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 WorkflowsClient(WorkflowsSettings settings) throws IOException { - this.settings = settings; - this.stub = ((WorkflowsStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - protected WorkflowsClient(WorkflowsStub stub) { - this.settings = null; - this.stub = stub; - this.operationsClient = - com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); - this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); - } - - public final WorkflowsSettings getSettings() { - return settings; - } - - public WorkflowsStub 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 com.google.longrunning.OperationsClient getOperationsClient() { - return operationsClient; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi - public final OperationsClient getHttpJsonOperationsClient() { - return httpJsonOperationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Project and location from which the workflows should be listed. Format: - * projects/{project}/locations/{location} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowsPagedResponse listWorkflows(LocationName parent) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listWorkflows(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Project and location from which the workflows should be listed. Format: - * projects/{project}/locations/{location} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListWorkflowsPagedResponse listWorkflows(String parent) { - ListWorkflowsRequest request = ListWorkflowsRequest.newBuilder().setParent(parent).build(); - return listWorkflows(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   ListWorkflowsRequest request =
-   *       ListWorkflowsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   for (Workflow element : workflowsClient.listWorkflows(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 ListWorkflowsPagedResponse listWorkflows(ListWorkflowsRequest request) { - return listWorkflowsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   ListWorkflowsRequest request =
-   *       ListWorkflowsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   ApiFuture future = workflowsClient.listWorkflowsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Workflow element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listWorkflowsPagedCallable() { - return stub.listWorkflowsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists Workflows in a given project and location. The default order is not specified. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   ListWorkflowsRequest request =
-   *       ListWorkflowsRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setFilter("filter-1274492040")
-   *           .setOrderBy("orderBy-1207110587")
-   *           .build();
-   *   while (true) {
-   *     ListWorkflowsResponse response = workflowsClient.listWorkflowsCallable().call(request);
-   *     for (Workflow element : response.getWorkflowsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listWorkflowsCallable() { - return stub.listWorkflowsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
-   *   Workflow response = workflowsClient.getWorkflow(name);
-   * }
-   * }
- * - * @param name Required. Name of the workflow which information should be retrieved. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Workflow getWorkflow(WorkflowName name) { - GetWorkflowRequest request = - GetWorkflowRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getWorkflow(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString();
-   *   Workflow response = workflowsClient.getWorkflow(name);
-   * }
-   * }
- * - * @param name Required. Name of the workflow which information should be retrieved. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Workflow getWorkflow(String name) { - GetWorkflowRequest request = GetWorkflowRequest.newBuilder().setName(name).build(); - return getWorkflow(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   GetWorkflowRequest request =
-   *       GetWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   Workflow response = workflowsClient.getWorkflow(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 Workflow getWorkflow(GetWorkflowRequest request) { - return getWorkflowCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets details of a single Workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   GetWorkflowRequest request =
-   *       GetWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   ApiFuture future = workflowsClient.getWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   Workflow response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getWorkflowCallable() { - return stub.getWorkflowCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Workflow workflow = Workflow.newBuilder().build();
-   *   String workflowId = "workflowId-360387270";
-   *   Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get();
-   * }
-   * }
- * - * @param parent Required. Project and location in which the workflow should be created. Format: - * projects/{project}/locations/{location} - * @param workflow Required. Workflow to be created. - * @param workflowId Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - *
    - *
  • Must contain only letters, numbers, underscores and hyphens. - *
  • Must start with a letter. - *
  • Must be between 1-64 characters. - *
  • Must end with a number or a letter. - *
  • Must be unique within the customer project and location. - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createWorkflowAsync( - LocationName parent, Workflow workflow, String workflowId) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setWorkflow(workflow) - .setWorkflowId(workflowId) - .build(); - return createWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
-   *   Workflow workflow = Workflow.newBuilder().build();
-   *   String workflowId = "workflowId-360387270";
-   *   Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get();
-   * }
-   * }
- * - * @param parent Required. Project and location in which the workflow should be created. Format: - * projects/{project}/locations/{location} - * @param workflow Required. Workflow to be created. - * @param workflowId Required. The ID of the workflow to be created. It has to fulfill the - * following requirements: - *
    - *
  • Must contain only letters, numbers, underscores and hyphens. - *
  • Must start with a letter. - *
  • Must be between 1-64 characters. - *
  • Must end with a number or a letter. - *
  • Must be unique within the customer project and location. - *
- * - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture createWorkflowAsync( - String parent, Workflow workflow, String workflowId) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(parent) - .setWorkflow(workflow) - .setWorkflowId(workflowId) - .build(); - return createWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   CreateWorkflowRequest request =
-   *       CreateWorkflowRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setWorkflowId("workflowId-360387270")
-   *           .build();
-   *   Workflow response = workflowsClient.createWorkflowAsync(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 createWorkflowAsync( - CreateWorkflowRequest request) { - return createWorkflowOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   CreateWorkflowRequest request =
-   *       CreateWorkflowRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setWorkflowId("workflowId-360387270")
-   *           .build();
-   *   OperationFuture future =
-   *       workflowsClient.createWorkflowOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Workflow response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - createWorkflowOperationCallable() { - return stub.createWorkflowOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new workflow. If a workflow with the specified name already exists in the specified - * project and location, the long running operation will return - * [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   CreateWorkflowRequest request =
-   *       CreateWorkflowRequest.newBuilder()
-   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setWorkflowId("workflowId-360387270")
-   *           .build();
-   *   ApiFuture future = workflowsClient.createWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createWorkflowCallable() { - return stub.createWorkflowCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
-   *   workflowsClient.deleteWorkflowAsync(name).get();
-   * }
-   * }
- * - * @param name Required. Name of the workflow to be deleted. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteWorkflowAsync(WorkflowName name) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString();
-   *   workflowsClient.deleteWorkflowAsync(name).get();
-   * }
-   * }
- * - * @param name Required. Name of the workflow to be deleted. Format: - * projects/{project}/locations/{location}/workflows/{workflow} - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture deleteWorkflowAsync(String name) { - DeleteWorkflowRequest request = DeleteWorkflowRequest.newBuilder().setName(name).build(); - return deleteWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   DeleteWorkflowRequest request =
-   *       DeleteWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   workflowsClient.deleteWorkflowAsync(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 deleteWorkflowAsync( - DeleteWorkflowRequest request) { - return deleteWorkflowOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   DeleteWorkflowRequest request =
-   *       DeleteWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   OperationFuture future =
-   *       workflowsClient.deleteWorkflowOperationCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final OperationCallable - deleteWorkflowOperationCallable() { - return stub.deleteWorkflowOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a workflow with the specified name. This method also cancels and deletes all running - * executions of the workflow. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   DeleteWorkflowRequest request =
-   *       DeleteWorkflowRequest.newBuilder()
-   *           .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
-   *           .build();
-   *   ApiFuture future = workflowsClient.deleteWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteWorkflowCallable() { - return stub.deleteWorkflowCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   Workflow workflow = Workflow.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   Workflow response = workflowsClient.updateWorkflowAsync(workflow, updateMask).get();
-   * }
-   * }
- * - * @param workflow Required. Workflow to be updated. - * @param updateMask List of fields to be updated. If not present, the entire workflow will be - * updated. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final OperationFuture updateWorkflowAsync( - Workflow workflow, FieldMask updateMask) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder().setWorkflow(workflow).setUpdateMask(updateMask).build(); - return updateWorkflowAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   UpdateWorkflowRequest request =
-   *       UpdateWorkflowRequest.newBuilder()
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   Workflow response = workflowsClient.updateWorkflowAsync(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 updateWorkflowAsync( - UpdateWorkflowRequest request) { - return updateWorkflowOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   UpdateWorkflowRequest request =
-   *       UpdateWorkflowRequest.newBuilder()
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   OperationFuture future =
-   *       workflowsClient.updateWorkflowOperationCallable().futureCall(request);
-   *   // Do something.
-   *   Workflow response = future.get();
-   * }
-   * }
- */ - public final OperationCallable - updateWorkflowOperationCallable() { - return stub.updateWorkflowOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an existing workflow. Running this method has no impact on already running executions - * of the workflow. A new revision of the workflow may be created as a result of a successful - * update operation. In that case, such revision will be used in new workflow executions. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
-   *   UpdateWorkflowRequest request =
-   *       UpdateWorkflowRequest.newBuilder()
-   *           .setWorkflow(Workflow.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = workflowsClient.updateWorkflowCallable().futureCall(request);
-   *   // Do something.
-   *   Operation response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateWorkflowCallable() { - return stub.updateWorkflowCallable(); - } - - @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 ListWorkflowsPagedResponse - extends AbstractPagedListResponse< - ListWorkflowsRequest, - ListWorkflowsResponse, - Workflow, - ListWorkflowsPage, - ListWorkflowsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListWorkflowsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListWorkflowsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListWorkflowsPagedResponse(ListWorkflowsPage page) { - super(page, ListWorkflowsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListWorkflowsPage - extends AbstractPage< - ListWorkflowsRequest, ListWorkflowsResponse, Workflow, ListWorkflowsPage> { - - private ListWorkflowsPage( - PageContext context, - ListWorkflowsResponse response) { - super(context, response); - } - - private static ListWorkflowsPage createEmptyPage() { - return new ListWorkflowsPage(null, null); - } - - @Override - protected ListWorkflowsPage createPage( - PageContext context, - ListWorkflowsResponse response) { - return new ListWorkflowsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListWorkflowsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListWorkflowsRequest, - ListWorkflowsResponse, - Workflow, - ListWorkflowsPage, - ListWorkflowsFixedSizeCollection> { - - private ListWorkflowsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListWorkflowsFixedSizeCollection createEmptyCollection() { - return new ListWorkflowsFixedSizeCollection(null, 0); - } - - @Override - protected ListWorkflowsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListWorkflowsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsSettings.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsSettings.java deleted file mode 100644 index 54ed98b0..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsSettings.java +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -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.httpjson.InstantiatingHttpJsonChannelProvider; -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.workflows.v1beta.stub.WorkflowsStubSettings; -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 WorkflowsClient}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsSettings.Builder workflowsSettingsBuilder = WorkflowsSettings.newBuilder();
- * workflowsSettingsBuilder
- *     .getWorkflowSettings()
- *     .setRetrySettings(
- *         workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * WorkflowsSettings workflowsSettings = workflowsSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class WorkflowsSettings extends ClientSettings { - - /** Returns the object with the settings used for calls to listWorkflows. */ - public PagedCallSettings - listWorkflowsSettings() { - return ((WorkflowsStubSettings) getStubSettings()).listWorkflowsSettings(); - } - - /** Returns the object with the settings used for calls to getWorkflow. */ - public UnaryCallSettings getWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).getWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public UnaryCallSettings createWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).createWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public OperationCallSettings - createWorkflowOperationSettings() { - return ((WorkflowsStubSettings) getStubSettings()).createWorkflowOperationSettings(); - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings deleteWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).deleteWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public OperationCallSettings - deleteWorkflowOperationSettings() { - return ((WorkflowsStubSettings) getStubSettings()).deleteWorkflowOperationSettings(); - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public UnaryCallSettings updateWorkflowSettings() { - return ((WorkflowsStubSettings) getStubSettings()).updateWorkflowSettings(); - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public OperationCallSettings - updateWorkflowOperationSettings() { - return ((WorkflowsStubSettings) getStubSettings()).updateWorkflowOperationSettings(); - } - - public static final WorkflowsSettings create(WorkflowsStubSettings stub) throws IOException { - return new WorkflowsSettings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return WorkflowsStubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return WorkflowsStubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return WorkflowsStubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return WorkflowsStubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return WorkflowsStubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return WorkflowsStubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return WorkflowsStubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return WorkflowsStubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 WorkflowsSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for WorkflowsSettings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(WorkflowsStubSettings.newBuilder(clientContext)); - } - - protected Builder(WorkflowsSettings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(WorkflowsStubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(WorkflowsStubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(WorkflowsStubSettings.newHttpJsonBuilder()); - } - - public WorkflowsStubSettings.Builder getStubSettingsBuilder() { - return ((WorkflowsStubSettings.Builder) getStubSettings()); - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to listWorkflows. */ - public PagedCallSettings.Builder< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings() { - return getStubSettingsBuilder().listWorkflowsSettings(); - } - - /** Returns the builder for the settings used for calls to getWorkflow. */ - public UnaryCallSettings.Builder getWorkflowSettings() { - return getStubSettingsBuilder().getWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - public UnaryCallSettings.Builder createWorkflowSettings() { - return getStubSettingsBuilder().createWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - public OperationCallSettings.Builder - createWorkflowOperationSettings() { - return getStubSettingsBuilder().createWorkflowOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings.Builder deleteWorkflowSettings() { - return getStubSettingsBuilder().deleteWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - public OperationCallSettings.Builder - deleteWorkflowOperationSettings() { - return getStubSettingsBuilder().deleteWorkflowOperationSettings(); - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - public UnaryCallSettings.Builder updateWorkflowSettings() { - return getStubSettingsBuilder().updateWorkflowSettings(); - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - public OperationCallSettings.Builder - updateWorkflowOperationSettings() { - return getStubSettingsBuilder().updateWorkflowOperationSettings(); - } - - @Override - public WorkflowsSettings build() throws IOException { - return new WorkflowsSettings(this); - } - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/gapic_metadata.json b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/gapic_metadata.json deleted file mode 100644 index 680c243b..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.workflows.v1beta", - "libraryPackage": "com.google.cloud.workflows.v1beta", - "services": { - "Workflows": { - "clients": { - "grpc": { - "libraryClient": "WorkflowsClient", - "rpcs": { - "CreateWorkflow": { - "methods": ["createWorkflowAsync", "createWorkflowAsync", "createWorkflowAsync", "createWorkflowOperationCallable", "createWorkflowCallable"] - }, - "DeleteWorkflow": { - "methods": ["deleteWorkflowAsync", "deleteWorkflowAsync", "deleteWorkflowAsync", "deleteWorkflowOperationCallable", "deleteWorkflowCallable"] - }, - "GetWorkflow": { - "methods": ["getWorkflow", "getWorkflow", "getWorkflow", "getWorkflowCallable"] - }, - "ListWorkflows": { - "methods": ["listWorkflows", "listWorkflows", "listWorkflows", "listWorkflowsPagedCallable", "listWorkflowsCallable"] - }, - "UpdateWorkflow": { - "methods": ["updateWorkflowAsync", "updateWorkflowAsync", "updateWorkflowOperationCallable", "updateWorkflowCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/package-info.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/package-info.java deleted file mode 100644 index da897c58..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/package-info.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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. - * - *

======================= WorkflowsClient ======================= - * - *

Service Description: Workflows is used to deploy and execute workflow programs. Workflows - * makes sure the program executes reliably, despite hardware and networking interruptions. - * - *

Sample for WorkflowsClient: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
- *   WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
- *   Workflow response = workflowsClient.getWorkflow(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.workflows.v1beta; - -import javax.annotation.Generated; diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsCallableFactory.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsCallableFactory.java deleted file mode 100644 index 387d4358..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.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 Workflows service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcWorkflowsCallableFactory 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-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsStub.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsStub.java deleted file mode 100644 index 846bc42d..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsStub.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.stub; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.GetWorkflowRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsResponse; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the Workflows service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcWorkflowsStub extends WorkflowsStub { - private static final MethodDescriptor - listWorkflowsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/ListWorkflows") - .setRequestMarshaller( - ProtoUtils.marshaller(ListWorkflowsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListWorkflowsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/GetWorkflow") - .setRequestMarshaller(ProtoUtils.marshaller(GetWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Workflow.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/CreateWorkflow") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/DeleteWorkflow") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateWorkflowMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/UpdateWorkflow") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateWorkflowRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final UnaryCallable listWorkflowsCallable; - private final UnaryCallable - listWorkflowsPagedCallable; - private final UnaryCallable getWorkflowCallable; - private final UnaryCallable createWorkflowCallable; - private final OperationCallable - createWorkflowOperationCallable; - private final UnaryCallable deleteWorkflowCallable; - private final OperationCallable - deleteWorkflowOperationCallable; - private final UnaryCallable updateWorkflowCallable; - private final OperationCallable - updateWorkflowOperationCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcWorkflowsStub create(WorkflowsStubSettings settings) throws IOException { - return new GrpcWorkflowsStub(settings, ClientContext.create(settings)); - } - - public static final GrpcWorkflowsStub create(ClientContext clientContext) throws IOException { - return new GrpcWorkflowsStub(WorkflowsStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcWorkflowsStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcWorkflowsStub( - WorkflowsStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcWorkflowsStub, 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 GrpcWorkflowsStub(WorkflowsStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcWorkflowsCallableFactory()); - } - - /** - * Constructs an instance of GrpcWorkflowsStub, 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 GrpcWorkflowsStub( - WorkflowsStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings listWorkflowsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listWorkflowsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateWorkflowTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("workflow.name", String.valueOf(request.getWorkflow().getName())); - return params.build(); - }) - .build(); - - this.listWorkflowsCallable = - callableFactory.createUnaryCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.listWorkflowsPagedCallable = - callableFactory.createPagedCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.getWorkflowCallable = - callableFactory.createUnaryCallable( - getWorkflowTransportSettings, settings.getWorkflowSettings(), clientContext); - this.createWorkflowCallable = - callableFactory.createUnaryCallable( - createWorkflowTransportSettings, settings.createWorkflowSettings(), clientContext); - this.createWorkflowOperationCallable = - callableFactory.createOperationCallable( - createWorkflowTransportSettings, - settings.createWorkflowOperationSettings(), - clientContext, - operationsStub); - this.deleteWorkflowCallable = - callableFactory.createUnaryCallable( - deleteWorkflowTransportSettings, settings.deleteWorkflowSettings(), clientContext); - this.deleteWorkflowOperationCallable = - callableFactory.createOperationCallable( - deleteWorkflowTransportSettings, - settings.deleteWorkflowOperationSettings(), - clientContext, - operationsStub); - this.updateWorkflowCallable = - callableFactory.createUnaryCallable( - updateWorkflowTransportSettings, settings.updateWorkflowSettings(), clientContext); - this.updateWorkflowOperationCallable = - callableFactory.createOperationCallable( - updateWorkflowTransportSettings, - settings.updateWorkflowOperationSettings(), - clientContext, - operationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable listWorkflowsCallable() { - return listWorkflowsCallable; - } - - @Override - public UnaryCallable - listWorkflowsPagedCallable() { - return listWorkflowsPagedCallable; - } - - @Override - public UnaryCallable getWorkflowCallable() { - return getWorkflowCallable; - } - - @Override - public UnaryCallable createWorkflowCallable() { - return createWorkflowCallable; - } - - @Override - public OperationCallable - createWorkflowOperationCallable() { - return createWorkflowOperationCallable; - } - - @Override - public UnaryCallable deleteWorkflowCallable() { - return deleteWorkflowCallable; - } - - @Override - public OperationCallable - deleteWorkflowOperationCallable() { - return deleteWorkflowOperationCallable; - } - - @Override - public UnaryCallable updateWorkflowCallable() { - return updateWorkflowCallable; - } - - @Override - public OperationCallable - updateWorkflowOperationCallable() { - return updateWorkflowOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/HttpJsonWorkflowsCallableFactory.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/HttpJsonWorkflowsCallableFactory.java deleted file mode 100644 index 7f5af182..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/HttpJsonWorkflowsCallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the Workflows service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonWorkflowsCallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/HttpJsonWorkflowsStub.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/HttpJsonWorkflowsStub.java deleted file mode 100644 index 668c0753..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/HttpJsonWorkflowsStub.java +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.stub; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.GetWorkflowRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsResponse; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the Workflows service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonWorkflowsStub extends WorkflowsStub { - private static final TypeRegistry typeRegistry = - TypeRegistry.newBuilder() - .add(Empty.getDescriptor()) - .add(OperationMetadata.getDescriptor()) - .add(Workflow.getDescriptor()) - .build(); - - private static final ApiMethodDescriptor - listWorkflowsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/ListWorkflows") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*}/workflows", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListWorkflowsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/GetWorkflow") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/workflows/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Workflow.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/CreateWorkflow") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{parent=projects/*/locations/*}/workflows", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "workflowId", request.getWorkflowId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("workflow", request.getWorkflow(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (CreateWorkflowRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - deleteWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/DeleteWorkflow") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{name=projects/*/locations/*/workflows/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (DeleteWorkflowRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private static final ApiMethodDescriptor - updateWorkflowMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName("google.cloud.workflows.v1beta.Workflows/UpdateWorkflow") - .setHttpMethod("PATCH") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta/{workflow.name=projects/*/locations/*/workflows/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "workflow.name", request.getWorkflow().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("workflow", request.getWorkflow(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Operation.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .setOperationSnapshotFactory( - (UpdateWorkflowRequest request, Operation response) -> - HttpJsonOperationSnapshot.create(response)) - .build(); - - private final UnaryCallable listWorkflowsCallable; - private final UnaryCallable - listWorkflowsPagedCallable; - private final UnaryCallable getWorkflowCallable; - private final UnaryCallable createWorkflowCallable; - private final OperationCallable - createWorkflowOperationCallable; - private final UnaryCallable deleteWorkflowCallable; - private final OperationCallable - deleteWorkflowOperationCallable; - private final UnaryCallable updateWorkflowCallable; - private final OperationCallable - updateWorkflowOperationCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonOperationsStub httpJsonOperationsStub; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonWorkflowsStub create(WorkflowsStubSettings settings) - throws IOException { - return new HttpJsonWorkflowsStub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonWorkflowsStub create(ClientContext clientContext) throws IOException { - return new HttpJsonWorkflowsStub( - WorkflowsStubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonWorkflowsStub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonWorkflowsStub( - WorkflowsStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonWorkflowsStub, 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 HttpJsonWorkflowsStub(WorkflowsStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonWorkflowsCallableFactory()); - } - - /** - * Constructs an instance of HttpJsonWorkflowsStub, 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 HttpJsonWorkflowsStub( - WorkflowsStubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.httpJsonOperationsStub = - HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); - - HttpJsonCallSettings - listWorkflowsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listWorkflowsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateWorkflowTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateWorkflowMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.listWorkflowsCallable = - callableFactory.createUnaryCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.listWorkflowsPagedCallable = - callableFactory.createPagedCallable( - listWorkflowsTransportSettings, settings.listWorkflowsSettings(), clientContext); - this.getWorkflowCallable = - callableFactory.createUnaryCallable( - getWorkflowTransportSettings, settings.getWorkflowSettings(), clientContext); - this.createWorkflowCallable = - callableFactory.createUnaryCallable( - createWorkflowTransportSettings, settings.createWorkflowSettings(), clientContext); - this.createWorkflowOperationCallable = - callableFactory.createOperationCallable( - createWorkflowTransportSettings, - settings.createWorkflowOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.deleteWorkflowCallable = - callableFactory.createUnaryCallable( - deleteWorkflowTransportSettings, settings.deleteWorkflowSettings(), clientContext); - this.deleteWorkflowOperationCallable = - callableFactory.createOperationCallable( - deleteWorkflowTransportSettings, - settings.deleteWorkflowOperationSettings(), - clientContext, - httpJsonOperationsStub); - this.updateWorkflowCallable = - callableFactory.createUnaryCallable( - updateWorkflowTransportSettings, settings.updateWorkflowSettings(), clientContext); - this.updateWorkflowOperationCallable = - callableFactory.createOperationCallable( - updateWorkflowTransportSettings, - settings.updateWorkflowOperationSettings(), - clientContext, - httpJsonOperationsStub); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(listWorkflowsMethodDescriptor); - methodDescriptors.add(getWorkflowMethodDescriptor); - methodDescriptors.add(createWorkflowMethodDescriptor); - methodDescriptors.add(deleteWorkflowMethodDescriptor); - methodDescriptors.add(updateWorkflowMethodDescriptor); - return methodDescriptors; - } - - public HttpJsonOperationsStub getHttpJsonOperationsStub() { - return httpJsonOperationsStub; - } - - @Override - public UnaryCallable listWorkflowsCallable() { - return listWorkflowsCallable; - } - - @Override - public UnaryCallable - listWorkflowsPagedCallable() { - return listWorkflowsPagedCallable; - } - - @Override - public UnaryCallable getWorkflowCallable() { - return getWorkflowCallable; - } - - @Override - public UnaryCallable createWorkflowCallable() { - return createWorkflowCallable; - } - - @Override - public OperationCallable - createWorkflowOperationCallable() { - return createWorkflowOperationCallable; - } - - @Override - public UnaryCallable deleteWorkflowCallable() { - return deleteWorkflowCallable; - } - - @Override - public OperationCallable - deleteWorkflowOperationCallable() { - return deleteWorkflowOperationCallable; - } - - @Override - public UnaryCallable updateWorkflowCallable() { - return updateWorkflowCallable; - } - - @Override - public OperationCallable - updateWorkflowOperationCallable() { - return updateWorkflowOperationCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStub.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStub.java deleted file mode 100644 index 5d7f5288..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStub.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.stub; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -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.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.GetWorkflowRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsResponse; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -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 Workflows service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class WorkflowsStub implements BackgroundResource { - - public OperationsStub getOperationsStub() { - return null; - } - - public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { - return null; - } - - public UnaryCallable - listWorkflowsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listWorkflowsPagedCallable()"); - } - - public UnaryCallable listWorkflowsCallable() { - throw new UnsupportedOperationException("Not implemented: listWorkflowsCallable()"); - } - - public UnaryCallable getWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: getWorkflowCallable()"); - } - - public OperationCallable - createWorkflowOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowOperationCallable()"); - } - - public UnaryCallable createWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: createWorkflowCallable()"); - } - - public OperationCallable - deleteWorkflowOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteWorkflowOperationCallable()"); - } - - public UnaryCallable deleteWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: deleteWorkflowCallable()"); - } - - public OperationCallable - updateWorkflowOperationCallable() { - throw new UnsupportedOperationException("Not implemented: updateWorkflowOperationCallable()"); - } - - public UnaryCallable updateWorkflowCallable() { - throw new UnsupportedOperationException("Not implemented: updateWorkflowCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStubSettings.java b/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStubSettings.java deleted file mode 100644 index c6933518..00000000 --- a/google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStubSettings.java +++ /dev/null @@ -1,618 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.stub; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -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.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -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.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.GetWorkflowRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsResponse; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -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 WorkflowsStub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * WorkflowsStubSettings.Builder workflowsSettingsBuilder = WorkflowsStubSettings.newBuilder();
- * workflowsSettingsBuilder
- *     .getWorkflowSettings()
- *     .setRetrySettings(
- *         workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * WorkflowsStubSettings workflowsSettings = workflowsSettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class WorkflowsStubSettings 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< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings; - private final UnaryCallSettings getWorkflowSettings; - private final UnaryCallSettings createWorkflowSettings; - private final OperationCallSettings - createWorkflowOperationSettings; - private final UnaryCallSettings deleteWorkflowSettings; - private final OperationCallSettings - deleteWorkflowOperationSettings; - private final UnaryCallSettings updateWorkflowSettings; - private final OperationCallSettings - updateWorkflowOperationSettings; - - private static final PagedListDescriptor - LIST_WORKFLOWS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListWorkflowsRequest injectToken(ListWorkflowsRequest payload, String token) { - return ListWorkflowsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListWorkflowsRequest injectPageSize(ListWorkflowsRequest payload, int pageSize) { - return ListWorkflowsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListWorkflowsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListWorkflowsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListWorkflowsResponse payload) { - return payload.getWorkflowsList() == null - ? ImmutableList.of() - : payload.getWorkflowsList(); - } - }; - - private static final PagedListResponseFactory< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - LIST_WORKFLOWS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListWorkflowsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_WORKFLOWS_PAGE_STR_DESC, request, context); - return ListWorkflowsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to listWorkflows. */ - public PagedCallSettings - listWorkflowsSettings() { - return listWorkflowsSettings; - } - - /** Returns the object with the settings used for calls to getWorkflow. */ - public UnaryCallSettings getWorkflowSettings() { - return getWorkflowSettings; - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public UnaryCallSettings createWorkflowSettings() { - return createWorkflowSettings; - } - - /** Returns the object with the settings used for calls to createWorkflow. */ - public OperationCallSettings - createWorkflowOperationSettings() { - return createWorkflowOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings deleteWorkflowSettings() { - return deleteWorkflowSettings; - } - - /** Returns the object with the settings used for calls to deleteWorkflow. */ - public OperationCallSettings - deleteWorkflowOperationSettings() { - return deleteWorkflowOperationSettings; - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public UnaryCallSettings updateWorkflowSettings() { - return updateWorkflowSettings; - } - - /** Returns the object with the settings used for calls to updateWorkflow. */ - public OperationCallSettings - updateWorkflowOperationSettings() { - return updateWorkflowOperationSettings; - } - - public WorkflowsStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcWorkflowsStub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonWorkflowsStub.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 "workflows.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "workflows.mtls.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder() - .setScopesToApply(DEFAULT_SERVICE_SCOPES) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(WorkflowsStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(WorkflowsStubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return WorkflowsStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 WorkflowsStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - listWorkflowsSettings = settingsBuilder.listWorkflowsSettings().build(); - getWorkflowSettings = settingsBuilder.getWorkflowSettings().build(); - createWorkflowSettings = settingsBuilder.createWorkflowSettings().build(); - createWorkflowOperationSettings = settingsBuilder.createWorkflowOperationSettings().build(); - deleteWorkflowSettings = settingsBuilder.deleteWorkflowSettings().build(); - deleteWorkflowOperationSettings = settingsBuilder.deleteWorkflowOperationSettings().build(); - updateWorkflowSettings = settingsBuilder.updateWorkflowSettings().build(); - updateWorkflowOperationSettings = settingsBuilder.updateWorkflowOperationSettings().build(); - } - - /** Builder for WorkflowsStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final PagedCallSettings.Builder< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings; - private final UnaryCallSettings.Builder getWorkflowSettings; - private final UnaryCallSettings.Builder - createWorkflowSettings; - private final OperationCallSettings.Builder - createWorkflowOperationSettings; - private final UnaryCallSettings.Builder - deleteWorkflowSettings; - private final OperationCallSettings.Builder - deleteWorkflowOperationSettings; - private final UnaryCallSettings.Builder - updateWorkflowSettings; - private final OperationCallSettings.Builder - updateWorkflowOperationSettings; - 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); - - listWorkflowsSettings = PagedCallSettings.newBuilder(LIST_WORKFLOWS_PAGE_STR_FACT); - getWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createWorkflowOperationSettings = OperationCallSettings.newBuilder(); - deleteWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteWorkflowOperationSettings = OperationCallSettings.newBuilder(); - updateWorkflowSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateWorkflowOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listWorkflowsSettings, - getWorkflowSettings, - createWorkflowSettings, - deleteWorkflowSettings, - updateWorkflowSettings); - initDefaults(this); - } - - protected Builder(WorkflowsStubSettings settings) { - super(settings); - - listWorkflowsSettings = settings.listWorkflowsSettings.toBuilder(); - getWorkflowSettings = settings.getWorkflowSettings.toBuilder(); - createWorkflowSettings = settings.createWorkflowSettings.toBuilder(); - createWorkflowOperationSettings = settings.createWorkflowOperationSettings.toBuilder(); - deleteWorkflowSettings = settings.deleteWorkflowSettings.toBuilder(); - deleteWorkflowOperationSettings = settings.deleteWorkflowOperationSettings.toBuilder(); - updateWorkflowSettings = settings.updateWorkflowSettings.toBuilder(); - updateWorkflowOperationSettings = settings.updateWorkflowOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - listWorkflowsSettings, - getWorkflowSettings, - createWorkflowSettings, - deleteWorkflowSettings, - updateWorkflowSettings); - } - - 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 createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .listWorkflowsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .getWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .deleteWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .updateWorkflowSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - builder - .createWorkflowOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Workflow.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 - .deleteWorkflowOperationSettings() - .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 - .updateWorkflowOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Workflow.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; - } - - /** - * Applies the given settings updater function to all of the unary API methods in this service. - * - *

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to listWorkflows. */ - public PagedCallSettings.Builder< - ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse> - listWorkflowsSettings() { - return listWorkflowsSettings; - } - - /** Returns the builder for the settings used for calls to getWorkflow. */ - public UnaryCallSettings.Builder getWorkflowSettings() { - return getWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - public UnaryCallSettings.Builder createWorkflowSettings() { - return createWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to createWorkflow. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createWorkflowOperationSettings() { - return createWorkflowOperationSettings; - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - public UnaryCallSettings.Builder deleteWorkflowSettings() { - return deleteWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to deleteWorkflow. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteWorkflowOperationSettings() { - return deleteWorkflowOperationSettings; - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - public UnaryCallSettings.Builder updateWorkflowSettings() { - return updateWorkflowSettings; - } - - /** Returns the builder for the settings used for calls to updateWorkflow. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - updateWorkflowOperationSettings() { - return updateWorkflowOperationSettings; - } - - @Override - public WorkflowsStubSettings build() throws IOException { - return new WorkflowsStubSettings(this); - } - } -} diff --git a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/MockWorkflows.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/MockWorkflows.java deleted file mode 100644 index cd57c1fc..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/MockWorkflows.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.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 MockWorkflows implements MockGrpcService { - private final MockWorkflowsImpl serviceImpl; - - public MockWorkflows() { - serviceImpl = new MockWorkflowsImpl(); - } - - @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-workflows/src/test/java/com/google/cloud/workflows/v1/MockWorkflowsImpl.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/MockWorkflowsImpl.java deleted file mode 100644 index 5d960a76..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/MockWorkflowsImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1; - -import com.google.api.core.BetaApi; -import com.google.cloud.workflows.v1.WorkflowsGrpc.WorkflowsImplBase; -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 MockWorkflowsImpl extends WorkflowsImplBase { - private List requests; - private Queue responses; - - public MockWorkflowsImpl() { - 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 listWorkflows( - ListWorkflowsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListWorkflowsResponse) { - requests.add(request); - responseObserver.onNext(((ListWorkflowsResponse) 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 ListWorkflows, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListWorkflowsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getWorkflow(GetWorkflowRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Workflow) { - requests.add(request); - responseObserver.onNext(((Workflow) 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 GetWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Workflow.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createWorkflow( - CreateWorkflowRequest 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 CreateWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteWorkflow( - DeleteWorkflowRequest 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 DeleteWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateWorkflow( - UpdateWorkflowRequest 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 UpdateWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/WorkflowsClientHttpJsonTest.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/WorkflowsClientHttpJsonTest.java deleted file mode 100644 index f7b150ce..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/WorkflowsClientHttpJsonTest.java +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.workflows.v1.stub.HttpJsonWorkflowsStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -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 WorkflowsClientHttpJsonTest { - private static MockHttpService mockService; - private static WorkflowsClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonWorkflowsStub.getMethodDescriptors(), WorkflowsSettings.getDefaultEndpoint()); - WorkflowsSettings settings = - WorkflowsSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - WorkflowsSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowsClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listWorkflowsTest() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listWorkflowsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowsTest2() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listWorkflowsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getWorkflowExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createWorkflowExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteWorkflowTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.deleteWorkflowAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteWorkflowTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteWorkflowExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - client.deleteWorkflowAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Workflow workflow = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Workflow actualResponse = client.updateWorkflowAsync(workflow, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Workflow workflow = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateWorkflowAsync(workflow, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/WorkflowsClientTest.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/WorkflowsClientTest.java deleted file mode 100644 index a17462ea..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1/WorkflowsClientTest.java +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1; - -import static com.google.cloud.workflows.v1.WorkflowsClient.ListWorkflowsPagedResponse; - -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 WorkflowsClientTest { - private static MockServiceHelper mockServiceHelper; - private static MockWorkflows mockWorkflows; - private LocalChannelProvider channelProvider; - private WorkflowsClient client; - - @BeforeClass - public static void startStaticServer() { - mockWorkflows = new MockWorkflows(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockWorkflows)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - WorkflowsSettings settings = - WorkflowsSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowsClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listWorkflowsTest() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockWorkflows.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowsRequest actualRequest = ((ListWorkflowsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowsTest2() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockWorkflows.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowsRequest actualRequest = ((ListWorkflowsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String parent = "parent-995424086"; - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockWorkflows.addResponse(expectedResponse); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetWorkflowRequest actualRequest = ((GetWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockWorkflows.addResponse(expectedResponse); - - String name = "name3373707"; - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetWorkflowRequest actualRequest = ((GetWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getWorkflowExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String name = "name3373707"; - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowRequest actualRequest = ((CreateWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(workflow, actualRequest.getWorkflow()); - Assert.assertEquals(workflowId, actualRequest.getWorkflowId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).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 createWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - String parent = "parent-995424086"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowRequest actualRequest = ((CreateWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(workflow, actualRequest.getWorkflow()); - Assert.assertEquals(workflowId, actualRequest.getWorkflowId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String parent = "parent-995424086"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).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 deleteWorkflowTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteWorkflowRequest actualRequest = ((DeleteWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.deleteWorkflowAsync(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 deleteWorkflowTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteWorkflowRequest actualRequest = ((DeleteWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteWorkflowExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String name = "name3373707"; - client.deleteWorkflowAsync(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 updateWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - Workflow workflow = Workflow.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Workflow actualResponse = client.updateWorkflowAsync(workflow, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateWorkflowRequest actualRequest = ((UpdateWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(workflow, actualRequest.getWorkflow()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - Workflow workflow = Workflow.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateWorkflowAsync(workflow, 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()); - } - } -} diff --git a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflows.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflows.java deleted file mode 100644 index dbc8164d..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflows.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -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 MockWorkflows implements MockGrpcService { - private final MockWorkflowsImpl serviceImpl; - - public MockWorkflows() { - serviceImpl = new MockWorkflowsImpl(); - } - - @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-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflowsImpl.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflowsImpl.java deleted file mode 100644 index 9291f31f..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflowsImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -import com.google.api.core.BetaApi; -import com.google.cloud.workflows.v1beta.WorkflowsGrpc.WorkflowsImplBase; -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 MockWorkflowsImpl extends WorkflowsImplBase { - private List requests; - private Queue responses; - - public MockWorkflowsImpl() { - 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 listWorkflows( - ListWorkflowsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListWorkflowsResponse) { - requests.add(request); - responseObserver.onNext(((ListWorkflowsResponse) 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 ListWorkflows, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListWorkflowsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getWorkflow(GetWorkflowRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Workflow) { - requests.add(request); - responseObserver.onNext(((Workflow) 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 GetWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Workflow.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createWorkflow( - CreateWorkflowRequest 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 CreateWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteWorkflow( - DeleteWorkflowRequest 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 DeleteWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateWorkflow( - UpdateWorkflowRequest 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 UpdateWorkflow, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Operation.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientHttpJsonTest.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientHttpJsonTest.java deleted file mode 100644 index 3487acdc..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientHttpJsonTest.java +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.workflows.v1beta.stub.HttpJsonWorkflowsStub; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Any; -import com.google.protobuf.Empty; -import com.google.protobuf.FieldMask; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -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 WorkflowsClientHttpJsonTest { - private static MockHttpService mockService; - private static WorkflowsClient client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonWorkflowsStub.getMethodDescriptors(), WorkflowsSettings.getDefaultEndpoint()); - WorkflowsSettings settings = - WorkflowsSettings.newHttpJsonBuilder() - .setTransportChannelProvider( - WorkflowsSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowsClient.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void listWorkflowsTest() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listWorkflowsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowsTest2() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-5833/locations/location-5833"; - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listWorkflowsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getWorkflowExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void createWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String parent = "projects/project-5833/locations/location-5833"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createWorkflowExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-5833/locations/location-5833"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteWorkflowTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.deleteWorkflowAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void deleteWorkflowTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteWorkflowExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-4710/locations/location-4710/workflows/workflow-4710"; - client.deleteWorkflowAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } - - @Test - public void updateWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockService.addResponse(resultOperation); - - Workflow workflow = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Workflow actualResponse = client.updateWorkflowAsync(workflow, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateWorkflowExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Workflow workflow = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateWorkflowAsync(workflow, updateMask).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - } - } -} diff --git a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientTest.java b/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientTest.java deleted file mode 100644 index e719474f..00000000 --- a/google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientTest.java +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse; - -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 WorkflowsClientTest { - private static MockServiceHelper mockServiceHelper; - private static MockWorkflows mockWorkflows; - private LocalChannelProvider channelProvider; - private WorkflowsClient client; - - @BeforeClass - public static void startStaticServer() { - mockWorkflows = new MockWorkflows(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockWorkflows)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - WorkflowsSettings settings = - WorkflowsSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = WorkflowsClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void listWorkflowsTest() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockWorkflows.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowsRequest actualRequest = ((ListWorkflowsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listWorkflowsTest2() throws Exception { - Workflow responsesElement = Workflow.newBuilder().build(); - ListWorkflowsResponse expectedResponse = - ListWorkflowsResponse.newBuilder() - .setNextPageToken("") - .addAllWorkflows(Arrays.asList(responsesElement)) - .build(); - mockWorkflows.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListWorkflowsPagedResponse pagedListResponse = client.listWorkflows(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getWorkflowsList().get(0), resources.get(0)); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListWorkflowsRequest actualRequest = ((ListWorkflowsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listWorkflowsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String parent = "parent-995424086"; - client.listWorkflows(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockWorkflows.addResponse(expectedResponse); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetWorkflowRequest actualRequest = ((GetWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - mockWorkflows.addResponse(expectedResponse); - - String name = "name3373707"; - - Workflow actualResponse = client.getWorkflow(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetWorkflowRequest actualRequest = ((GetWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getWorkflowExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String name = "name3373707"; - client.getWorkflow(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowRequest actualRequest = ((CreateWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(workflow, actualRequest.getWorkflow()); - Assert.assertEquals(workflowId, actualRequest.getWorkflowId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).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 createWorkflowTest2() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - String parent = "parent-995424086"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - - Workflow actualResponse = client.createWorkflowAsync(parent, workflow, workflowId).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateWorkflowRequest actualRequest = ((CreateWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(workflow, actualRequest.getWorkflow()); - Assert.assertEquals(workflowId, actualRequest.getWorkflowId()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createWorkflowExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String parent = "parent-995424086"; - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - client.createWorkflowAsync(parent, workflow, workflowId).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 deleteWorkflowTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteWorkflowRequest actualRequest = ((DeleteWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - client.deleteWorkflowAsync(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 deleteWorkflowTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - String name = "name3373707"; - - client.deleteWorkflowAsync(name).get(); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteWorkflowRequest actualRequest = ((DeleteWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteWorkflowExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - String name = "name3373707"; - client.deleteWorkflowAsync(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 updateWorkflowTest() throws Exception { - Workflow expectedResponse = - Workflow.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .setDescription("description-1724546052") - .setRevisionId("revisionId-1507445162") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setRevisionCreateTime(Timestamp.newBuilder().build()) - .putAllLabels(new HashMap()) - .setServiceAccount("serviceAccount1079137720") - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("updateWorkflowTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockWorkflows.addResponse(resultOperation); - - Workflow workflow = Workflow.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - Workflow actualResponse = client.updateWorkflowAsync(workflow, updateMask).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockWorkflows.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateWorkflowRequest actualRequest = ((UpdateWorkflowRequest) actualRequests.get(0)); - - Assert.assertEquals(workflow, actualRequest.getWorkflow()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateWorkflowExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockWorkflows.addException(exception); - - try { - Workflow workflow = Workflow.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateWorkflowAsync(workflow, 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()); - } - } -} diff --git a/grpc-google-cloud-workflows-v1/pom.xml b/grpc-google-cloud-workflows-v1/pom.xml deleted file mode 100644 index dd1e6e22..00000000 --- a/grpc-google-cloud-workflows-v1/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-workflows-v1 - 2.3.7-SNAPSHOT - grpc-google-cloud-workflows-v1 - GRPC library for google-cloud-workflows - - com.google.cloud - google-cloud-workflows-parent - 2.3.7-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-workflows-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-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowsGrpc.java b/grpc-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowsGrpc.java deleted file mode 100644 index 84b65fcb..00000000 --- a/grpc-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowsGrpc.java +++ /dev/null @@ -1,852 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.workflows.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Workflows is used to deploy and execute workflow programs.
- * Workflows makes sure the program executes reliably, despite hardware and
- * networking interruptions.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/workflows/v1/workflows.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class WorkflowsGrpc { - - private WorkflowsGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.workflows.v1.Workflows"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.ListWorkflowsRequest, - com.google.cloud.workflows.v1.ListWorkflowsResponse> - getListWorkflowsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListWorkflows", - requestType = com.google.cloud.workflows.v1.ListWorkflowsRequest.class, - responseType = com.google.cloud.workflows.v1.ListWorkflowsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.ListWorkflowsRequest, - com.google.cloud.workflows.v1.ListWorkflowsResponse> - getListWorkflowsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.ListWorkflowsRequest, - com.google.cloud.workflows.v1.ListWorkflowsResponse> - getListWorkflowsMethod; - if ((getListWorkflowsMethod = WorkflowsGrpc.getListWorkflowsMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getListWorkflowsMethod = WorkflowsGrpc.getListWorkflowsMethod) == null) { - WorkflowsGrpc.getListWorkflowsMethod = - getListWorkflowsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListWorkflows")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.ListWorkflowsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.ListWorkflowsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("ListWorkflows")) - .build(); - } - } - } - return getListWorkflowsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.GetWorkflowRequest, com.google.cloud.workflows.v1.Workflow> - getGetWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetWorkflow", - requestType = com.google.cloud.workflows.v1.GetWorkflowRequest.class, - responseType = com.google.cloud.workflows.v1.Workflow.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.GetWorkflowRequest, com.google.cloud.workflows.v1.Workflow> - getGetWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.GetWorkflowRequest, - com.google.cloud.workflows.v1.Workflow> - getGetWorkflowMethod; - if ((getGetWorkflowMethod = WorkflowsGrpc.getGetWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getGetWorkflowMethod = WorkflowsGrpc.getGetWorkflowMethod) == null) { - WorkflowsGrpc.getGetWorkflowMethod = - getGetWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.GetWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.Workflow.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("GetWorkflow")) - .build(); - } - } - } - return getGetWorkflowMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.CreateWorkflowRequest, com.google.longrunning.Operation> - getCreateWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateWorkflow", - requestType = com.google.cloud.workflows.v1.CreateWorkflowRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.CreateWorkflowRequest, com.google.longrunning.Operation> - getCreateWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.CreateWorkflowRequest, com.google.longrunning.Operation> - getCreateWorkflowMethod; - if ((getCreateWorkflowMethod = WorkflowsGrpc.getCreateWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getCreateWorkflowMethod = WorkflowsGrpc.getCreateWorkflowMethod) == null) { - WorkflowsGrpc.getCreateWorkflowMethod = - getCreateWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.CreateWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("CreateWorkflow")) - .build(); - } - } - } - return getCreateWorkflowMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.DeleteWorkflowRequest, com.google.longrunning.Operation> - getDeleteWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteWorkflow", - requestType = com.google.cloud.workflows.v1.DeleteWorkflowRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.DeleteWorkflowRequest, com.google.longrunning.Operation> - getDeleteWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.DeleteWorkflowRequest, com.google.longrunning.Operation> - getDeleteWorkflowMethod; - if ((getDeleteWorkflowMethod = WorkflowsGrpc.getDeleteWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getDeleteWorkflowMethod = WorkflowsGrpc.getDeleteWorkflowMethod) == null) { - WorkflowsGrpc.getDeleteWorkflowMethod = - getDeleteWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.DeleteWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("DeleteWorkflow")) - .build(); - } - } - } - return getDeleteWorkflowMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.UpdateWorkflowRequest, com.google.longrunning.Operation> - getUpdateWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateWorkflow", - requestType = com.google.cloud.workflows.v1.UpdateWorkflowRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.UpdateWorkflowRequest, com.google.longrunning.Operation> - getUpdateWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1.UpdateWorkflowRequest, com.google.longrunning.Operation> - getUpdateWorkflowMethod; - if ((getUpdateWorkflowMethod = WorkflowsGrpc.getUpdateWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getUpdateWorkflowMethod = WorkflowsGrpc.getUpdateWorkflowMethod) == null) { - WorkflowsGrpc.getUpdateWorkflowMethod = - getUpdateWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1.UpdateWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("UpdateWorkflow")) - .build(); - } - } - } - return getUpdateWorkflowMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static WorkflowsStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsStub(channel, callOptions); - } - }; - return WorkflowsStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static WorkflowsBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowsBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsBlockingStub(channel, callOptions); - } - }; - return WorkflowsBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static WorkflowsFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowsFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsFutureStub(channel, callOptions); - } - }; - return WorkflowsFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public abstract static class WorkflowsImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public void listWorkflows( - com.google.cloud.workflows.v1.ListWorkflowsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListWorkflowsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public void getWorkflow( - com.google.cloud.workflows.v1.GetWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetWorkflowMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public void createWorkflow( - com.google.cloud.workflows.v1.CreateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateWorkflowMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public void deleteWorkflow( - com.google.cloud.workflows.v1.DeleteWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteWorkflowMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public void updateWorkflow( - com.google.cloud.workflows.v1.UpdateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateWorkflowMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListWorkflowsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1.ListWorkflowsRequest, - com.google.cloud.workflows.v1.ListWorkflowsResponse>( - this, METHODID_LIST_WORKFLOWS))) - .addMethod( - getGetWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1.GetWorkflowRequest, - com.google.cloud.workflows.v1.Workflow>(this, METHODID_GET_WORKFLOW))) - .addMethod( - getCreateWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1.CreateWorkflowRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_WORKFLOW))) - .addMethod( - getDeleteWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1.DeleteWorkflowRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_WORKFLOW))) - .addMethod( - getUpdateWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1.UpdateWorkflowRequest, - com.google.longrunning.Operation>(this, METHODID_UPDATE_WORKFLOW))) - .build(); - } - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public static final class WorkflowsStub extends io.grpc.stub.AbstractAsyncStub { - private WorkflowsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public void listWorkflows( - com.google.cloud.workflows.v1.ListWorkflowsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListWorkflowsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public void getWorkflow( - com.google.cloud.workflows.v1.GetWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public void createWorkflow( - com.google.cloud.workflows.v1.CreateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public void deleteWorkflow( - com.google.cloud.workflows.v1.DeleteWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public void updateWorkflow( - com.google.cloud.workflows.v1.UpdateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public static final class WorkflowsBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private WorkflowsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowsBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public com.google.cloud.workflows.v1.ListWorkflowsResponse listWorkflows( - com.google.cloud.workflows.v1.ListWorkflowsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListWorkflowsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public com.google.cloud.workflows.v1.Workflow getWorkflow( - com.google.cloud.workflows.v1.GetWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetWorkflowMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public com.google.longrunning.Operation createWorkflow( - com.google.cloud.workflows.v1.CreateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateWorkflowMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public com.google.longrunning.Operation deleteWorkflow( - com.google.cloud.workflows.v1.DeleteWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteWorkflowMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public com.google.longrunning.Operation updateWorkflow( - com.google.cloud.workflows.v1.UpdateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateWorkflowMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public static final class WorkflowsFutureStub - extends io.grpc.stub.AbstractFutureStub { - private WorkflowsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.workflows.v1.ListWorkflowsResponse> - listWorkflows(com.google.cloud.workflows.v1.ListWorkflowsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListWorkflowsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.workflows.v1.Workflow> - getWorkflow(com.google.cloud.workflows.v1.GetWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetWorkflowMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createWorkflow(com.google.cloud.workflows.v1.CreateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateWorkflowMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteWorkflow(com.google.cloud.workflows.v1.DeleteWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteWorkflowMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateWorkflow(com.google.cloud.workflows.v1.UpdateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateWorkflowMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_WORKFLOWS = 0; - private static final int METHODID_GET_WORKFLOW = 1; - private static final int METHODID_CREATE_WORKFLOW = 2; - private static final int METHODID_DELETE_WORKFLOW = 3; - private static final int METHODID_UPDATE_WORKFLOW = 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 WorkflowsImplBase serviceImpl; - private final int methodId; - - MethodHandlers(WorkflowsImplBase 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_WORKFLOWS: - serviceImpl.listWorkflows( - (com.google.cloud.workflows.v1.ListWorkflowsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_WORKFLOW: - serviceImpl.getWorkflow( - (com.google.cloud.workflows.v1.GetWorkflowRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_WORKFLOW: - serviceImpl.createWorkflow( - (com.google.cloud.workflows.v1.CreateWorkflowRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_WORKFLOW: - serviceImpl.deleteWorkflow( - (com.google.cloud.workflows.v1.DeleteWorkflowRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_WORKFLOW: - serviceImpl.updateWorkflow( - (com.google.cloud.workflows.v1.UpdateWorkflowRequest) 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 WorkflowsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - WorkflowsBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Workflows"); - } - } - - private static final class WorkflowsFileDescriptorSupplier - extends WorkflowsBaseDescriptorSupplier { - WorkflowsFileDescriptorSupplier() {} - } - - private static final class WorkflowsMethodDescriptorSupplier - extends WorkflowsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - WorkflowsMethodDescriptorSupplier(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 (WorkflowsGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new WorkflowsFileDescriptorSupplier()) - .addMethod(getListWorkflowsMethod()) - .addMethod(getGetWorkflowMethod()) - .addMethod(getCreateWorkflowMethod()) - .addMethod(getDeleteWorkflowMethod()) - .addMethod(getUpdateWorkflowMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-workflows-v1beta/pom.xml b/grpc-google-cloud-workflows-v1beta/pom.xml deleted file mode 100644 index 7b122ef3..00000000 --- a/grpc-google-cloud-workflows-v1beta/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-workflows-v1beta - 0.9.7-SNAPSHOT - grpc-google-cloud-workflows-v1beta - GRPC library for google-cloud-workflows - - com.google.cloud - google-cloud-workflows-parent - 2.3.7-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-cloud-workflows-v1beta - - - com.google.guava - guava - - - com.google.api.grpc - proto-google-common-protos - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/grpc-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsGrpc.java b/grpc-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsGrpc.java deleted file mode 100644 index d1977c87..00000000 --- a/grpc-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsGrpc.java +++ /dev/null @@ -1,857 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Workflows is used to deploy and execute workflow programs.
- * Workflows makes sure the program executes reliably, despite hardware and
- * networking interruptions.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/workflows/v1beta/workflows.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class WorkflowsGrpc { - - private WorkflowsGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.workflows.v1beta.Workflows"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.ListWorkflowsRequest, - com.google.cloud.workflows.v1beta.ListWorkflowsResponse> - getListWorkflowsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListWorkflows", - requestType = com.google.cloud.workflows.v1beta.ListWorkflowsRequest.class, - responseType = com.google.cloud.workflows.v1beta.ListWorkflowsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.ListWorkflowsRequest, - com.google.cloud.workflows.v1beta.ListWorkflowsResponse> - getListWorkflowsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.ListWorkflowsRequest, - com.google.cloud.workflows.v1beta.ListWorkflowsResponse> - getListWorkflowsMethod; - if ((getListWorkflowsMethod = WorkflowsGrpc.getListWorkflowsMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getListWorkflowsMethod = WorkflowsGrpc.getListWorkflowsMethod) == null) { - WorkflowsGrpc.getListWorkflowsMethod = - getListWorkflowsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListWorkflows")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.ListWorkflowsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("ListWorkflows")) - .build(); - } - } - } - return getListWorkflowsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.GetWorkflowRequest, - com.google.cloud.workflows.v1beta.Workflow> - getGetWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetWorkflow", - requestType = com.google.cloud.workflows.v1beta.GetWorkflowRequest.class, - responseType = com.google.cloud.workflows.v1beta.Workflow.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.GetWorkflowRequest, - com.google.cloud.workflows.v1beta.Workflow> - getGetWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.GetWorkflowRequest, - com.google.cloud.workflows.v1beta.Workflow> - getGetWorkflowMethod; - if ((getGetWorkflowMethod = WorkflowsGrpc.getGetWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getGetWorkflowMethod = WorkflowsGrpc.getGetWorkflowMethod) == null) { - WorkflowsGrpc.getGetWorkflowMethod = - getGetWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.GetWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("GetWorkflow")) - .build(); - } - } - } - return getGetWorkflowMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.CreateWorkflowRequest, com.google.longrunning.Operation> - getCreateWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateWorkflow", - requestType = com.google.cloud.workflows.v1beta.CreateWorkflowRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.CreateWorkflowRequest, com.google.longrunning.Operation> - getCreateWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.CreateWorkflowRequest, - com.google.longrunning.Operation> - getCreateWorkflowMethod; - if ((getCreateWorkflowMethod = WorkflowsGrpc.getCreateWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getCreateWorkflowMethod = WorkflowsGrpc.getCreateWorkflowMethod) == null) { - WorkflowsGrpc.getCreateWorkflowMethod = - getCreateWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("CreateWorkflow")) - .build(); - } - } - } - return getCreateWorkflowMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest, com.google.longrunning.Operation> - getDeleteWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteWorkflow", - requestType = com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest, com.google.longrunning.Operation> - getDeleteWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest, - com.google.longrunning.Operation> - getDeleteWorkflowMethod; - if ((getDeleteWorkflowMethod = WorkflowsGrpc.getDeleteWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getDeleteWorkflowMethod = WorkflowsGrpc.getDeleteWorkflowMethod) == null) { - WorkflowsGrpc.getDeleteWorkflowMethod = - getDeleteWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("DeleteWorkflow")) - .build(); - } - } - } - return getDeleteWorkflowMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest, com.google.longrunning.Operation> - getUpdateWorkflowMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateWorkflow", - requestType = com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest, com.google.longrunning.Operation> - getUpdateWorkflowMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest, - com.google.longrunning.Operation> - getUpdateWorkflowMethod; - if ((getUpdateWorkflowMethod = WorkflowsGrpc.getUpdateWorkflowMethod) == null) { - synchronized (WorkflowsGrpc.class) { - if ((getUpdateWorkflowMethod = WorkflowsGrpc.getUpdateWorkflowMethod) == null) { - WorkflowsGrpc.getUpdateWorkflowMethod = - getUpdateWorkflowMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateWorkflow")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new WorkflowsMethodDescriptorSupplier("UpdateWorkflow")) - .build(); - } - } - } - return getUpdateWorkflowMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static WorkflowsStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsStub(channel, callOptions); - } - }; - return WorkflowsStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static WorkflowsBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowsBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsBlockingStub(channel, callOptions); - } - }; - return WorkflowsBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static WorkflowsFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public WorkflowsFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsFutureStub(channel, callOptions); - } - }; - return WorkflowsFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public abstract static class WorkflowsImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public void listWorkflows( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListWorkflowsMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public void getWorkflow( - com.google.cloud.workflows.v1beta.GetWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetWorkflowMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public void createWorkflow( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateWorkflowMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public void deleteWorkflow( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteWorkflowMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public void updateWorkflow( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateWorkflowMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListWorkflowsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1beta.ListWorkflowsRequest, - com.google.cloud.workflows.v1beta.ListWorkflowsResponse>( - this, METHODID_LIST_WORKFLOWS))) - .addMethod( - getGetWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1beta.GetWorkflowRequest, - com.google.cloud.workflows.v1beta.Workflow>(this, METHODID_GET_WORKFLOW))) - .addMethod( - getCreateWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1beta.CreateWorkflowRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_WORKFLOW))) - .addMethod( - getDeleteWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_WORKFLOW))) - .addMethod( - getUpdateWorkflowMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest, - com.google.longrunning.Operation>(this, METHODID_UPDATE_WORKFLOW))) - .build(); - } - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public static final class WorkflowsStub extends io.grpc.stub.AbstractAsyncStub { - private WorkflowsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public void listWorkflows( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListWorkflowsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public void getWorkflow( - com.google.cloud.workflows.v1beta.GetWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public void createWorkflow( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public void deleteWorkflow( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public void updateWorkflow( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateWorkflowMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public static final class WorkflowsBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private WorkflowsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowsBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public com.google.cloud.workflows.v1beta.ListWorkflowsResponse listWorkflows( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListWorkflowsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public com.google.cloud.workflows.v1beta.Workflow getWorkflow( - com.google.cloud.workflows.v1beta.GetWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetWorkflowMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public com.google.longrunning.Operation createWorkflow( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateWorkflowMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public com.google.longrunning.Operation deleteWorkflow( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteWorkflowMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public com.google.longrunning.Operation updateWorkflow( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateWorkflowMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Workflows is used to deploy and execute workflow programs.
-   * Workflows makes sure the program executes reliably, despite hardware and
-   * networking interruptions.
-   * 
- */ - public static final class WorkflowsFutureStub - extends io.grpc.stub.AbstractFutureStub { - private WorkflowsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected WorkflowsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new WorkflowsFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Lists Workflows in a given project and location.
-     * The default order is not specified.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.workflows.v1beta.ListWorkflowsResponse> - listWorkflows(com.google.cloud.workflows.v1beta.ListWorkflowsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListWorkflowsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets details of a single Workflow.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.workflows.v1beta.Workflow> - getWorkflow(com.google.cloud.workflows.v1beta.GetWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetWorkflowMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new workflow. If a workflow with the specified name already
-     * exists in the specified project and location, the long running operation
-     * will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createWorkflow(com.google.cloud.workflows.v1beta.CreateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateWorkflowMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a workflow with the specified name.
-     * This method also cancels and deletes all running executions of the
-     * workflow.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteWorkflow(com.google.cloud.workflows.v1beta.DeleteWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteWorkflowMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an existing workflow.
-     * Running this method has no impact on already running executions of the
-     * workflow. A new revision of the workflow may be created as a result of a
-     * successful update operation. In that case, such revision will be used
-     * in new workflow executions.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - updateWorkflow(com.google.cloud.workflows.v1beta.UpdateWorkflowRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateWorkflowMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_LIST_WORKFLOWS = 0; - private static final int METHODID_GET_WORKFLOW = 1; - private static final int METHODID_CREATE_WORKFLOW = 2; - private static final int METHODID_DELETE_WORKFLOW = 3; - private static final int METHODID_UPDATE_WORKFLOW = 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 WorkflowsImplBase serviceImpl; - private final int methodId; - - MethodHandlers(WorkflowsImplBase 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_WORKFLOWS: - serviceImpl.listWorkflows( - (com.google.cloud.workflows.v1beta.ListWorkflowsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_WORKFLOW: - serviceImpl.getWorkflow( - (com.google.cloud.workflows.v1beta.GetWorkflowRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_WORKFLOW: - serviceImpl.createWorkflow( - (com.google.cloud.workflows.v1beta.CreateWorkflowRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DELETE_WORKFLOW: - serviceImpl.deleteWorkflow( - (com.google.cloud.workflows.v1beta.DeleteWorkflowRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UPDATE_WORKFLOW: - serviceImpl.updateWorkflow( - (com.google.cloud.workflows.v1beta.UpdateWorkflowRequest) 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 WorkflowsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - WorkflowsBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("Workflows"); - } - } - - private static final class WorkflowsFileDescriptorSupplier - extends WorkflowsBaseDescriptorSupplier { - WorkflowsFileDescriptorSupplier() {} - } - - private static final class WorkflowsMethodDescriptorSupplier - extends WorkflowsBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - WorkflowsMethodDescriptorSupplier(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 (WorkflowsGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new WorkflowsFileDescriptorSupplier()) - .addMethod(getListWorkflowsMethod()) - .addMethod(getGetWorkflowMethod()) - .addMethod(getCreateWorkflowMethod()) - .addMethod(getDeleteWorkflowMethod()) - .addMethod(getUpdateWorkflowMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java.header b/java.header deleted file mode 100644 index d0970ba7..00000000 --- a/java.header +++ /dev/null @@ -1,15 +0,0 @@ -^/\*$ -^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$ -^ \*$ -^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ -^ \* you may not use this file except in compliance with the License\.$ -^ \* You may obtain a copy of the License at$ -^ \*$ -^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ -^ \*$ -^ \* Unless required by applicable law or agreed to in writing, software$ -^ \* distributed under the License is distributed on an "AS IS" BASIS,$ -^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ -^ \* See the License for the specific language governing permissions and$ -^ \* limitations under the License\.$ -^ \*/$ diff --git a/license-checks.xml b/license-checks.xml deleted file mode 100644 index 6597fced..00000000 --- a/license-checks.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 68f67471..00000000 --- a/pom.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-workflows-parent - pom - 2.3.7-SNAPSHOT - Google Cloud Workflows Parent - https://github.com/googleapis/java- - - Java idiomatic client for Google Cloud Platform services. - - - - com.google.cloud - google-cloud-shared-config - 1.5.3 - - - - - chingor - Jeff Ching - chingor@google.com - Google - - Developer - - - - - Google LLC - - - scm:git:git@github.com:googleapis/java-workflows.git - scm:git:git@github.com:googleapis/java-workflows.git - https://github.com/googleapis/java-workflows - HEAD - - - https://github.com/googleapis/java-/issues - GitHub Issues - - - - - Apache-2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - UTF-8 - UTF-8 - github - google-cloud-workflows-parent - - - - - - com.google.cloud - google-cloud-workflows - 2.3.7-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-workflows-v1 - 2.3.7-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-workflows-v1 - 2.3.7-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-workflows-v1beta - 0.9.7-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-workflows-v1beta - 0.9.7-SNAPSHOT - - - - com.google.cloud - google-cloud-shared-dependencies - 3.0.4 - pom - import - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - org.objenesis:objenesis - javax.annotation:javax.annotation-api - - - - - - - - - google-cloud-workflows - grpc-google-cloud-workflows-v1beta - grpc-google-cloud-workflows-v1 - proto-google-cloud-workflows-v1beta - proto-google-cloud-workflows-v1 - google-cloud-workflows-bom - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 3.4.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.4.1 - - - 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-workflows-v1/clirr-ignored-differences.xml b/proto-google-cloud-workflows-v1/clirr-ignored-differences.xml deleted file mode 100644 index eaa397b1..00000000 --- a/proto-google-cloud-workflows-v1/clirr-ignored-differences.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 7012 - com/google/cloud/workflows/v1/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/workflows/v1/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/workflows/v1/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-cloud-workflows-v1/pom.xml b/proto-google-cloud-workflows-v1/pom.xml deleted file mode 100644 index a873ee78..00000000 --- a/proto-google-cloud-workflows-v1/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-workflows-v1 - 2.3.7-SNAPSHOT - proto-google-cloud-workflows-v1 - Proto library for google-cloud-workflows - - com.google.cloud - google-cloud-workflows-parent - 2.3.7-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/CreateWorkflowRequest.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/CreateWorkflowRequest.java deleted file mode 100644 index c567c58c..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/CreateWorkflowRequest.java +++ /dev/null @@ -1,1151 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Request for the
- * [CreateWorkflow][google.cloud.workflows.v1.Workflows.CreateWorkflow]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.CreateWorkflowRequest} - */ -public final class CreateWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.CreateWorkflowRequest) - CreateWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateWorkflowRequest.newBuilder() to construct. - private CreateWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateWorkflowRequest() { - parent_ = ""; - workflowId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.CreateWorkflowRequest.class, - com.google.cloud.workflows.v1.CreateWorkflowRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WORKFLOW_FIELD_NUMBER = 2; - private com.google.cloud.workflows.v1.Workflow workflow_; - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - @java.lang.Override - public boolean hasWorkflow() { - return workflow_ != null; - } - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow getWorkflow() { - return workflow_ == null - ? com.google.cloud.workflows.v1.Workflow.getDefaultInstance() - : workflow_; - } - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowOrBuilder() { - return getWorkflow(); - } - - public static final int WORKFLOW_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object workflowId_; - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The workflowId. - */ - @java.lang.Override - public java.lang.String getWorkflowId() { - java.lang.Object ref = workflowId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - workflowId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for workflowId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getWorkflowIdBytes() { - java.lang.Object ref = workflowId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - workflowId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (workflow_ != null) { - output.writeMessage(2, getWorkflow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workflowId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, workflowId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (workflow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWorkflow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workflowId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, workflowId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.CreateWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.CreateWorkflowRequest other = - (com.google.cloud.workflows.v1.CreateWorkflowRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasWorkflow() != other.hasWorkflow()) return false; - if (hasWorkflow()) { - if (!getWorkflow().equals(other.getWorkflow())) return false; - } - if (!getWorkflowId().equals(other.getWorkflowId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasWorkflow()) { - hash = (37 * hash) + WORKFLOW_FIELD_NUMBER; - hash = (53 * hash) + getWorkflow().hashCode(); - } - hash = (37 * hash) + WORKFLOW_ID_FIELD_NUMBER; - hash = (53 * hash) + getWorkflowId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.CreateWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [CreateWorkflow][google.cloud.workflows.v1.Workflows.CreateWorkflow]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.CreateWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.CreateWorkflowRequest) - com.google.cloud.workflows.v1.CreateWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.CreateWorkflowRequest.class, - com.google.cloud.workflows.v1.CreateWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.CreateWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (workflowBuilder_ == null) { - workflow_ = null; - } else { - workflow_ = null; - workflowBuilder_ = null; - } - workflowId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.CreateWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.CreateWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.CreateWorkflowRequest build() { - com.google.cloud.workflows.v1.CreateWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.CreateWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1.CreateWorkflowRequest result = - new com.google.cloud.workflows.v1.CreateWorkflowRequest(this); - result.parent_ = parent_; - if (workflowBuilder_ == null) { - result.workflow_ = workflow_; - } else { - result.workflow_ = workflowBuilder_.build(); - } - result.workflowId_ = workflowId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1.CreateWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1.CreateWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.CreateWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1.CreateWorkflowRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasWorkflow()) { - mergeWorkflow(other.getWorkflow()); - } - if (!other.getWorkflowId().isEmpty()) { - workflowId_ = other.workflowId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getWorkflowFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - workflowId_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.workflows.v1.Workflow workflow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder> - workflowBuilder_; - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - public boolean hasWorkflow() { - return workflowBuilder_ != null || workflow_ != null; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - public com.google.cloud.workflows.v1.Workflow getWorkflow() { - if (workflowBuilder_ == null) { - return workflow_ == null - ? com.google.cloud.workflows.v1.Workflow.getDefaultInstance() - : workflow_; - } else { - return workflowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1.Workflow value) { - if (workflowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - workflow_ = value; - onChanged(); - } else { - workflowBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1.Workflow.Builder builderForValue) { - if (workflowBuilder_ == null) { - workflow_ = builderForValue.build(); - onChanged(); - } else { - workflowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeWorkflow(com.google.cloud.workflows.v1.Workflow value) { - if (workflowBuilder_ == null) { - if (workflow_ != null) { - workflow_ = - com.google.cloud.workflows.v1.Workflow.newBuilder(workflow_) - .mergeFrom(value) - .buildPartial(); - } else { - workflow_ = value; - } - onChanged(); - } else { - workflowBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearWorkflow() { - if (workflowBuilder_ == null) { - workflow_ = null; - onChanged(); - } else { - workflow_ = null; - workflowBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1.Workflow.Builder getWorkflowBuilder() { - - onChanged(); - return getWorkflowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowOrBuilder() { - if (workflowBuilder_ != null) { - return workflowBuilder_.getMessageOrBuilder(); - } else { - return workflow_ == null - ? com.google.cloud.workflows.v1.Workflow.getDefaultInstance() - : workflow_; - } - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder> - getWorkflowFieldBuilder() { - if (workflowBuilder_ == null) { - workflowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder>( - getWorkflow(), getParentForChildren(), isClean()); - workflow_ = null; - } - return workflowBuilder_; - } - - private java.lang.Object workflowId_ = ""; - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The workflowId. - */ - public java.lang.String getWorkflowId() { - java.lang.Object ref = workflowId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - workflowId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for workflowId. - */ - public com.google.protobuf.ByteString getWorkflowIdBytes() { - java.lang.Object ref = workflowId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - workflowId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The workflowId to set. - * @return This builder for chaining. - */ - public Builder setWorkflowId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - workflowId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearWorkflowId() { - - workflowId_ = getDefaultInstance().getWorkflowId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for workflowId to set. - * @return This builder for chaining. - */ - public Builder setWorkflowIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - workflowId_ = 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.workflows.v1.CreateWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.CreateWorkflowRequest) - private static final com.google.cloud.workflows.v1.CreateWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.CreateWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1.CreateWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.CreateWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/CreateWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/CreateWorkflowRequestOrBuilder.java deleted file mode 100644 index 0ae2af76..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/CreateWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface CreateWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.CreateWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - boolean hasWorkflow(); - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - com.google.cloud.workflows.v1.Workflow getWorkflow(); - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowOrBuilder(); - - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The workflowId. - */ - java.lang.String getWorkflowId(); - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for workflowId. - */ - com.google.protobuf.ByteString getWorkflowIdBytes(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/DeleteWorkflowRequest.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/DeleteWorkflowRequest.java deleted file mode 100644 index 28043b09..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/DeleteWorkflowRequest.java +++ /dev/null @@ -1,640 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Request for the
- * [DeleteWorkflow][google.cloud.workflows.v1.Workflows.DeleteWorkflow]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.DeleteWorkflowRequest} - */ -public final class DeleteWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.DeleteWorkflowRequest) - DeleteWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteWorkflowRequest.newBuilder() to construct. - private DeleteWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteWorkflowRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.DeleteWorkflowRequest.class, - com.google.cloud.workflows.v1.DeleteWorkflowRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.DeleteWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.DeleteWorkflowRequest other = - (com.google.cloud.workflows.v1.DeleteWorkflowRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.DeleteWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [DeleteWorkflow][google.cloud.workflows.v1.Workflows.DeleteWorkflow]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.DeleteWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.DeleteWorkflowRequest) - com.google.cloud.workflows.v1.DeleteWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.DeleteWorkflowRequest.class, - com.google.cloud.workflows.v1.DeleteWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.DeleteWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.DeleteWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.DeleteWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.DeleteWorkflowRequest build() { - com.google.cloud.workflows.v1.DeleteWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.DeleteWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1.DeleteWorkflowRequest result = - new com.google.cloud.workflows.v1.DeleteWorkflowRequest(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.workflows.v1.DeleteWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1.DeleteWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.DeleteWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1.DeleteWorkflowRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.DeleteWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.DeleteWorkflowRequest) - private static final com.google.cloud.workflows.v1.DeleteWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.DeleteWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1.DeleteWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.DeleteWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/DeleteWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/DeleteWorkflowRequestOrBuilder.java deleted file mode 100644 index ae5c9716..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/DeleteWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface DeleteWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.DeleteWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/GetWorkflowRequest.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/GetWorkflowRequest.java deleted file mode 100644 index 515ca33a..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/GetWorkflowRequest.java +++ /dev/null @@ -1,638 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Request for the
- * [GetWorkflow][google.cloud.workflows.v1.Workflows.GetWorkflow] method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.GetWorkflowRequest} - */ -public final class GetWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.GetWorkflowRequest) - GetWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetWorkflowRequest.newBuilder() to construct. - private GetWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetWorkflowRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_GetWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_GetWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.GetWorkflowRequest.class, - com.google.cloud.workflows.v1.GetWorkflowRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.GetWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.GetWorkflowRequest other = - (com.google.cloud.workflows.v1.GetWorkflowRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.GetWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [GetWorkflow][google.cloud.workflows.v1.Workflows.GetWorkflow] method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.GetWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.GetWorkflowRequest) - com.google.cloud.workflows.v1.GetWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_GetWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_GetWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.GetWorkflowRequest.class, - com.google.cloud.workflows.v1.GetWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.GetWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_GetWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.GetWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.GetWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.GetWorkflowRequest build() { - com.google.cloud.workflows.v1.GetWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.GetWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1.GetWorkflowRequest result = - new com.google.cloud.workflows.v1.GetWorkflowRequest(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.workflows.v1.GetWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1.GetWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.GetWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1.GetWorkflowRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.GetWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.GetWorkflowRequest) - private static final com.google.cloud.workflows.v1.GetWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.GetWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1.GetWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.GetWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/GetWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/GetWorkflowRequestOrBuilder.java deleted file mode 100644 index e72ab770..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/GetWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface GetWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.GetWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsRequest.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsRequest.java deleted file mode 100644 index b21e7341..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsRequest.java +++ /dev/null @@ -1,1319 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Request for the
- * [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.ListWorkflowsRequest} - */ -public final class ListWorkflowsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.ListWorkflowsRequest) - ListWorkflowsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListWorkflowsRequest.newBuilder() to construct. - private ListWorkflowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListWorkflowsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListWorkflowsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.ListWorkflowsRequest.class, - com.google.cloud.workflows.v1.ListWorkflowsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * Maximum number of workflows to return per call. The service may return
-   * fewer than this value. If the value is not specified, a default value of
-   * 500 will be used. The maximum permitted value is 1000 and values greater
-   * than 1000 will be coerced down to 1000.
-   * 
- * - * 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_; - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * 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; - } - } - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - private volatile java.lang.Object orderBy_; - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.ListWorkflowsRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.ListWorkflowsRequest other = - (com.google.cloud.workflows.v1.ListWorkflowsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.ListWorkflowsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.ListWorkflowsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.ListWorkflowsRequest) - com.google.cloud.workflows.v1.ListWorkflowsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.ListWorkflowsRequest.class, - com.google.cloud.workflows.v1.ListWorkflowsRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.ListWorkflowsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - orderBy_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.ListWorkflowsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsRequest build() { - com.google.cloud.workflows.v1.ListWorkflowsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsRequest buildPartial() { - com.google.cloud.workflows.v1.ListWorkflowsRequest result = - new com.google.cloud.workflows.v1.ListWorkflowsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - result.orderBy_ = orderBy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1.ListWorkflowsRequest) { - return mergeFrom((com.google.cloud.workflows.v1.ListWorkflowsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.ListWorkflowsRequest other) { - if (other == com.google.cloud.workflows.v1.ListWorkflowsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Maximum number of workflows to return per call. The service may return
-     * fewer than this value. If the value is not specified, a default value of
-     * 500 will be used. The maximum permitted value is 1000 and values greater
-     * than 1000 will be coerced down to 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Maximum number of workflows to return per call. The service may return
-     * fewer than this value. If the value is not specified, a default value of
-     * 500 will be used. The maximum permitted value is 1000 and values greater
-     * than 1000 will be coerced down to 1000.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Maximum number of workflows to return per call. The service may return
-     * fewer than this value. If the value is not specified, a default value of
-     * 500 will be used. The maximum permitted value is 1000 and values greater
-     * than 1000 will be coerced down to 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * 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; - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.ListWorkflowsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.ListWorkflowsRequest) - private static final com.google.cloud.workflows.v1.ListWorkflowsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.ListWorkflowsRequest(); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListWorkflowsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsRequestOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsRequestOrBuilder.java deleted file mode 100644 index 9be14698..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsRequestOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface ListWorkflowsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.ListWorkflowsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Maximum number of workflows to return per call. The service may return
-   * fewer than this value. If the value is not specified, a default value of
-   * 500 will be used. The maximum permitted value is 1000 and values greater
-   * than 1000 will be coerced down to 1000.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsResponse.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsResponse.java deleted file mode 100644 index 572674d2..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsResponse.java +++ /dev/null @@ -1,1385 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Response for the
- * [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.ListWorkflowsResponse} - */ -public final class ListWorkflowsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.ListWorkflowsResponse) - ListWorkflowsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListWorkflowsResponse.newBuilder() to construct. - private ListWorkflowsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListWorkflowsResponse() { - workflows_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListWorkflowsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.ListWorkflowsResponse.class, - com.google.cloud.workflows.v1.ListWorkflowsResponse.Builder.class); - } - - public static final int WORKFLOWS_FIELD_NUMBER = 1; - private java.util.List workflows_; - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - @java.lang.Override - public java.util.List getWorkflowsList() { - return workflows_; - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - @java.lang.Override - public java.util.List - getWorkflowsOrBuilderList() { - return workflows_; - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - @java.lang.Override - public int getWorkflowsCount() { - return workflows_.size(); - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow getWorkflows(int index) { - return workflows_.get(index); - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - @java.lang.Override - public com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowsOrBuilder(int index) { - return workflows_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < workflows_.size(); i++) { - output.writeMessage(1, workflows_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < workflows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, workflows_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.ListWorkflowsResponse)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.ListWorkflowsResponse other = - (com.google.cloud.workflows.v1.ListWorkflowsResponse) obj; - - if (!getWorkflowsList().equals(other.getWorkflowsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWorkflowsCount() > 0) { - hash = (37 * hash) + WORKFLOWS_FIELD_NUMBER; - hash = (53 * hash) + getWorkflowsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.ListWorkflowsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response for the
-   * [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.ListWorkflowsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.ListWorkflowsResponse) - com.google.cloud.workflows.v1.ListWorkflowsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.ListWorkflowsResponse.class, - com.google.cloud.workflows.v1.ListWorkflowsResponse.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.ListWorkflowsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (workflowsBuilder_ == null) { - workflows_ = java.util.Collections.emptyList(); - } else { - workflows_ = null; - workflowsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsResponse getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.ListWorkflowsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsResponse build() { - com.google.cloud.workflows.v1.ListWorkflowsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsResponse buildPartial() { - com.google.cloud.workflows.v1.ListWorkflowsResponse result = - new com.google.cloud.workflows.v1.ListWorkflowsResponse(this); - int from_bitField0_ = bitField0_; - if (workflowsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - workflows_ = java.util.Collections.unmodifiableList(workflows_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.workflows_ = workflows_; - } else { - result.workflows_ = workflowsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.unreachable_ = unreachable_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1.ListWorkflowsResponse) { - return mergeFrom((com.google.cloud.workflows.v1.ListWorkflowsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.ListWorkflowsResponse other) { - if (other == com.google.cloud.workflows.v1.ListWorkflowsResponse.getDefaultInstance()) - return this; - if (workflowsBuilder_ == null) { - if (!other.workflows_.isEmpty()) { - if (workflows_.isEmpty()) { - workflows_ = other.workflows_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWorkflowsIsMutable(); - workflows_.addAll(other.workflows_); - } - onChanged(); - } - } else { - if (!other.workflows_.isEmpty()) { - if (workflowsBuilder_.isEmpty()) { - workflowsBuilder_.dispose(); - workflowsBuilder_ = null; - workflows_ = other.workflows_; - bitField0_ = (bitField0_ & ~0x00000001); - workflowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getWorkflowsFieldBuilder() - : null; - } else { - workflowsBuilder_.addAllMessages(other.workflows_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.workflows.v1.Workflow m = - input.readMessage( - com.google.cloud.workflows.v1.Workflow.parser(), extensionRegistry); - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.add(m); - } else { - workflowsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List workflows_ = - java.util.Collections.emptyList(); - - private void ensureWorkflowsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - workflows_ = new java.util.ArrayList(workflows_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder> - workflowsBuilder_; - - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public java.util.List getWorkflowsList() { - if (workflowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(workflows_); - } else { - return workflowsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public int getWorkflowsCount() { - if (workflowsBuilder_ == null) { - return workflows_.size(); - } else { - return workflowsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1.Workflow getWorkflows(int index) { - if (workflowsBuilder_ == null) { - return workflows_.get(index); - } else { - return workflowsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder setWorkflows(int index, com.google.cloud.workflows.v1.Workflow value) { - if (workflowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWorkflowsIsMutable(); - workflows_.set(index, value); - onChanged(); - } else { - workflowsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder setWorkflows( - int index, com.google.cloud.workflows.v1.Workflow.Builder builderForValue) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.set(index, builderForValue.build()); - onChanged(); - } else { - workflowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder addWorkflows(com.google.cloud.workflows.v1.Workflow value) { - if (workflowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWorkflowsIsMutable(); - workflows_.add(value); - onChanged(); - } else { - workflowsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder addWorkflows(int index, com.google.cloud.workflows.v1.Workflow value) { - if (workflowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWorkflowsIsMutable(); - workflows_.add(index, value); - onChanged(); - } else { - workflowsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder addWorkflows(com.google.cloud.workflows.v1.Workflow.Builder builderForValue) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.add(builderForValue.build()); - onChanged(); - } else { - workflowsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder addWorkflows( - int index, com.google.cloud.workflows.v1.Workflow.Builder builderForValue) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.add(index, builderForValue.build()); - onChanged(); - } else { - workflowsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder addAllWorkflows( - java.lang.Iterable values) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, workflows_); - onChanged(); - } else { - workflowsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder clearWorkflows() { - if (workflowsBuilder_ == null) { - workflows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - workflowsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public Builder removeWorkflows(int index) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.remove(index); - onChanged(); - } else { - workflowsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1.Workflow.Builder getWorkflowsBuilder(int index) { - return getWorkflowsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowsOrBuilder(int index) { - if (workflowsBuilder_ == null) { - return workflows_.get(index); - } else { - return workflowsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public java.util.List - getWorkflowsOrBuilderList() { - if (workflowsBuilder_ != null) { - return workflowsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(workflows_); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1.Workflow.Builder addWorkflowsBuilder() { - return getWorkflowsFieldBuilder() - .addBuilder(com.google.cloud.workflows.v1.Workflow.getDefaultInstance()); - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1.Workflow.Builder addWorkflowsBuilder(int index) { - return getWorkflowsFieldBuilder() - .addBuilder(index, com.google.cloud.workflows.v1.Workflow.getDefaultInstance()); - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - public java.util.List - getWorkflowsBuilderList() { - return getWorkflowsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder> - getWorkflowsFieldBuilder() { - if (workflowsBuilder_ == null) { - workflowsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder>( - workflows_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - workflows_ = null; - } - return workflowsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.ListWorkflowsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.ListWorkflowsResponse) - private static final com.google.cloud.workflows.v1.ListWorkflowsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.ListWorkflowsResponse(); - } - - public static com.google.cloud.workflows.v1.ListWorkflowsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListWorkflowsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.ListWorkflowsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsResponseOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsResponseOrBuilder.java deleted file mode 100644 index 334b3496..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/ListWorkflowsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface ListWorkflowsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.ListWorkflowsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - java.util.List getWorkflowsList(); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - com.google.cloud.workflows.v1.Workflow getWorkflows(int index); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - int getWorkflowsCount(); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - java.util.List - getWorkflowsOrBuilderList(); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1.Workflow workflows = 1; - */ - com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowsOrBuilder(int index); - - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/LocationName.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/LocationName.java deleted file mode 100644 index 3d5a334d..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/OperationMetadata.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/OperationMetadata.java deleted file mode 100644 index 35a3f16b..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/OperationMetadata.java +++ /dev/null @@ -1,1493 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Represents the metadata of the long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.OperationMetadata} - */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.OperationMetadata) - OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OperationMetadata() { - target_ = ""; - verb_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.OperationMetadata.class, - com.google.cloud.workflows.v1.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int TARGET_FIELD_NUMBER = 3; - private volatile java.lang.Object target_; - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } - } - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - private volatile java.lang.Object verb_; - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } - } - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int API_VERSION_FIELD_NUMBER = 5; - private volatile java.lang.Object apiVersion_; - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } - } - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, apiVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, apiVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.OperationMetadata other = - (com.google.cloud.workflows.v1.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.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.workflows.v1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.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.workflows.v1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.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.workflows.v1.OperationMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.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.workflows.v1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.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.workflows.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.workflows.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.workflows.v1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the metadata of the long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.OperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.OperationMetadata) - com.google.cloud.workflows.v1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.OperationMetadata.class, - com.google.cloud.workflows.v1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.OperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - target_ = ""; - - verb_ = ""; - - apiVersion_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.OperationMetadata build() { - com.google.cloud.workflows.v1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.OperationMetadata buildPartial() { - com.google.cloud.workflows.v1.OperationMetadata result = - new com.google.cloud.workflows.v1.OperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.target_ = target_; - result.verb_ = verb_; - result.apiVersion_ = apiVersion_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1.OperationMetadata) { - return mergeFrom((com.google.cloud.workflows.v1.OperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.OperationMetadata other) { - if (other == com.google.cloud.workflows.v1.OperationMetadata.getDefaultInstance()) - return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - onChanged(); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - apiVersion_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @return The bytes for target. - */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - target_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @return This builder for chaining. - */ - public Builder clearTarget() { - - target_ = getDefaultInstance().getTarget(); - onChanged(); - return this; - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - target_ = value; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - verb_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @return This builder for chaining. - */ - public Builder clearVerb() { - - verb_ = getDefaultInstance().getVerb(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - verb_ = value; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiVersion_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - - apiVersion_ = getDefaultInstance().getApiVersion(); - onChanged(); - return this; - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiVersion_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.OperationMetadata) - private static final com.google.cloud.workflows.v1.OperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.OperationMetadata(); - } - - public static com.google.cloud.workflows.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 { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/OperationMetadataOrBuilder.java deleted file mode 100644 index 7a05e531..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface OperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The target. - */ - java.lang.String getTarget(); - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The bytes for target. - */ - com.google.protobuf.ByteString getTargetBytes(); - - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The verb. - */ - java.lang.String getVerb(); - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The bytes for verb. - */ - com.google.protobuf.ByteString getVerbBytes(); - - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString getApiVersionBytes(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/UpdateWorkflowRequest.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/UpdateWorkflowRequest.java deleted file mode 100644 index f28257ff..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/UpdateWorkflowRequest.java +++ /dev/null @@ -1,1006 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Request for the
- * [UpdateWorkflow][google.cloud.workflows.v1.Workflows.UpdateWorkflow]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.UpdateWorkflowRequest} - */ -public final class UpdateWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.UpdateWorkflowRequest) - UpdateWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateWorkflowRequest.newBuilder() to construct. - private UpdateWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateWorkflowRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.UpdateWorkflowRequest.class, - com.google.cloud.workflows.v1.UpdateWorkflowRequest.Builder.class); - } - - public static final int WORKFLOW_FIELD_NUMBER = 1; - private com.google.cloud.workflows.v1.Workflow workflow_; - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - @java.lang.Override - public boolean hasWorkflow() { - return workflow_ != null; - } - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow getWorkflow() { - return workflow_ == null - ? com.google.cloud.workflows.v1.Workflow.getDefaultInstance() - : workflow_; - } - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowOrBuilder() { - return getWorkflow(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (workflow_ != null) { - output.writeMessage(1, getWorkflow()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (workflow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getWorkflow()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.UpdateWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.UpdateWorkflowRequest other = - (com.google.cloud.workflows.v1.UpdateWorkflowRequest) obj; - - if (hasWorkflow() != other.hasWorkflow()) return false; - if (hasWorkflow()) { - if (!getWorkflow().equals(other.getWorkflow())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasWorkflow()) { - hash = (37 * hash) + WORKFLOW_FIELD_NUMBER; - hash = (53 * hash) + getWorkflow().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.UpdateWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [UpdateWorkflow][google.cloud.workflows.v1.Workflows.UpdateWorkflow]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.UpdateWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.UpdateWorkflowRequest) - com.google.cloud.workflows.v1.UpdateWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.UpdateWorkflowRequest.class, - com.google.cloud.workflows.v1.UpdateWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.UpdateWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (workflowBuilder_ == null) { - workflow_ = null; - } else { - workflow_ = null; - workflowBuilder_ = 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.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.UpdateWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.UpdateWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.UpdateWorkflowRequest build() { - com.google.cloud.workflows.v1.UpdateWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.UpdateWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1.UpdateWorkflowRequest result = - new com.google.cloud.workflows.v1.UpdateWorkflowRequest(this); - if (workflowBuilder_ == null) { - result.workflow_ = workflow_; - } else { - result.workflow_ = workflowBuilder_.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.workflows.v1.UpdateWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1.UpdateWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.UpdateWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1.UpdateWorkflowRequest.getDefaultInstance()) - return this; - if (other.hasWorkflow()) { - mergeWorkflow(other.getWorkflow()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getWorkflowFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.cloud.workflows.v1.Workflow workflow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder> - workflowBuilder_; - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - public boolean hasWorkflow() { - return workflowBuilder_ != null || workflow_ != null; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - public com.google.cloud.workflows.v1.Workflow getWorkflow() { - if (workflowBuilder_ == null) { - return workflow_ == null - ? com.google.cloud.workflows.v1.Workflow.getDefaultInstance() - : workflow_; - } else { - return workflowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1.Workflow value) { - if (workflowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - workflow_ = value; - onChanged(); - } else { - workflowBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1.Workflow.Builder builderForValue) { - if (workflowBuilder_ == null) { - workflow_ = builderForValue.build(); - onChanged(); - } else { - workflowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeWorkflow(com.google.cloud.workflows.v1.Workflow value) { - if (workflowBuilder_ == null) { - if (workflow_ != null) { - workflow_ = - com.google.cloud.workflows.v1.Workflow.newBuilder(workflow_) - .mergeFrom(value) - .buildPartial(); - } else { - workflow_ = value; - } - onChanged(); - } else { - workflowBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearWorkflow() { - if (workflowBuilder_ == null) { - workflow_ = null; - onChanged(); - } else { - workflow_ = null; - workflowBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1.Workflow.Builder getWorkflowBuilder() { - - onChanged(); - return getWorkflowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowOrBuilder() { - if (workflowBuilder_ != null) { - return workflowBuilder_.getMessageOrBuilder(); - } else { - return workflow_ == null - ? com.google.cloud.workflows.v1.Workflow.getDefaultInstance() - : workflow_; - } - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder> - getWorkflowFieldBuilder() { - if (workflowBuilder_ == null) { - workflowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1.Workflow, - com.google.cloud.workflows.v1.Workflow.Builder, - com.google.cloud.workflows.v1.WorkflowOrBuilder>( - getWorkflow(), getParentForChildren(), isClean()); - workflow_ = null; - } - return workflowBuilder_; - } - - 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_; - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1.UpdateWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.UpdateWorkflowRequest) - private static final com.google.cloud.workflows.v1.UpdateWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.UpdateWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1.UpdateWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.UpdateWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/UpdateWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/UpdateWorkflowRequestOrBuilder.java deleted file mode 100644 index 7427139d..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/UpdateWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface UpdateWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.UpdateWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - boolean hasWorkflow(); - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - com.google.cloud.workflows.v1.Workflow getWorkflow(); - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.workflows.v1.WorkflowOrBuilder getWorkflowOrBuilder(); - - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/Workflow.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/Workflow.java deleted file mode 100644 index b4837f6f..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/Workflow.java +++ /dev/null @@ -1,3120 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -/** - * - * - *
- * Workflow program to be executed by Workflows.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1.Workflow} - */ -public final class Workflow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1.Workflow) - WorkflowOrBuilder { - private static final long serialVersionUID = 0L; - // Use Workflow.newBuilder() to construct. - private Workflow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Workflow() { - name_ = ""; - description_ = ""; - state_ = 0; - revisionId_ = ""; - serviceAccount_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Workflow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_Workflow_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_Workflow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.Workflow.class, - com.google.cloud.workflows.v1.Workflow.Builder.class); - } - - /** - * - * - *
-   * Describes the current state of workflow deployment. More states may be
-   * added in the future.
-   * 
- * - * Protobuf enum {@code google.cloud.workflows.v1.Workflow.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Invalid state.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The workflow has been deployed successfully and is serving.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Invalid state.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The workflow has been deployed successfully and is serving.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return ACTIVE; - 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.workflows.v1.Workflow.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.workflows.v1.Workflow.State) - } - - private int sourceCodeCase_ = 0; - private java.lang.Object sourceCode_; - - public enum SourceCodeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SOURCE_CONTENTS(10), - SOURCECODE_NOT_SET(0); - private final int value; - - private SourceCodeCase(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 SourceCodeCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCodeCase forNumber(int value) { - switch (value) { - case 10: - return SOURCE_CONTENTS; - case 0: - return SOURCECODE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public SourceCodeCase getSourceCodeCase() { - return SourceCodeCase.forNumber(sourceCodeCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The resource name of the workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * 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 workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * 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 DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_; - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.workflows.v1.Workflow.State result = - com.google.cloud.workflows.v1.Workflow.State.valueOf(state_); - return result == null ? com.google.cloud.workflows.v1.Workflow.State.UNRECOGNIZED : result; - } - - public static final int REVISION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object revisionId_; - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following properties of a workflow:
-   * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-   * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following properties of a workflow:
-   * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-   * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - revisionId_ = 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 last update timestamp of the workflow.
-   * 
- * - * .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 last update timestamp of the workflow.
-   * 
- * - * .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 last update timestamp of the workflow.
-   * 
- * - * .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 REVISION_CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp revisionCreateTime_; - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the revisionCreateTime field is set. - */ - @java.lang.Override - public boolean hasRevisionCreateTime() { - return revisionCreateTime_ != null; - } - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The revisionCreateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRevisionCreateTime() { - return revisionCreateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : revisionCreateTime_; - } - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - return getRevisionCreateTime(); - } - - public static final int LABELS_FIELD_NUMBER = 8; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 9; - private volatile java.lang.Object serviceAccount_; - /** - * - * - *
-   * The service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account} or {account}
-   * Using `-` as a wildcard for the `{project}` or not providing one at all
-   * will infer the project from the account. The `{account}` value can be the
-   * `email` address or the `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @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; - } - } - /** - * - * - *
-   * The service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account} or {account}
-   * Using `-` as a wildcard for the `{project}` or not providing one at all
-   * will infer the project from the account. The `{account}` value can be the
-   * `email` address or the `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @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 SOURCE_CONTENTS_FIELD_NUMBER = 10; - /** - * - * - *
-   * Workflow code to be executed. The size limit is 128KB.
-   * 
- * - * string source_contents = 10; - * - * @return Whether the sourceContents field is set. - */ - public boolean hasSourceContents() { - return sourceCodeCase_ == 10; - } - /** - * - * - *
-   * Workflow code to be executed. The size limit is 128KB.
-   * 
- * - * string source_contents = 10; - * - * @return The sourceContents. - */ - public java.lang.String getSourceContents() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (ref instanceof java.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 (sourceCodeCase_ == 10) { - sourceCode_ = s; - } - return s; - } - } - /** - * - * - *
-   * Workflow code to be executed. The size limit is 128KB.
-   * 
- * - * string source_contents = 10; - * - * @return The bytes for sourceContents. - */ - public com.google.protobuf.ByteString getSourceContentsBytes() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (sourceCodeCase_ == 10) { - sourceCode_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (state_ != com.google.cloud.workflows.v1.Workflow.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - if (revisionCreateTime_ != null) { - output.writeMessage(7, getRevisionCreateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceAccount_); - } - if (sourceCodeCase_ == 10) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sourceCode_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (state_ != com.google.cloud.workflows.v1.Workflow.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); - } - if (revisionCreateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRevisionCreateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceAccount_); - } - if (sourceCodeCase_ == 10) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sourceCode_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1.Workflow)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1.Workflow other = (com.google.cloud.workflows.v1.Workflow) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (!getRevisionId().equals(other.getRevisionId())) 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 (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; - if (hasRevisionCreateTime()) { - if (!getRevisionCreateTime().equals(other.getRevisionCreateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getServiceAccount().equals(other.getServiceAccount())) return false; - if (!getSourceCodeCase().equals(other.getSourceCodeCase())) return false; - switch (sourceCodeCase_) { - case 10: - if (!getSourceContents().equals(other.getSourceContents())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasRevisionCreateTime()) { - hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getRevisionCreateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - switch (sourceCodeCase_) { - case 10: - hash = (37 * hash) + SOURCE_CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getSourceContents().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.Workflow parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.Workflow parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1.Workflow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1.Workflow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Workflow program to be executed by Workflows.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1.Workflow} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1.Workflow) - com.google.cloud.workflows.v1.WorkflowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_Workflow_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 8: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_Workflow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1.Workflow.class, - com.google.cloud.workflows.v1.Workflow.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1.Workflow.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - state_ = 0; - - revisionId_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - serviceAccount_ = ""; - - sourceCodeCase_ = 0; - sourceCode_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1.WorkflowsProto - .internal_static_google_cloud_workflows_v1_Workflow_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow getDefaultInstanceForType() { - return com.google.cloud.workflows.v1.Workflow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow build() { - com.google.cloud.workflows.v1.Workflow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow buildPartial() { - com.google.cloud.workflows.v1.Workflow result = - new com.google.cloud.workflows.v1.Workflow(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - result.revisionId_ = revisionId_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (revisionCreateTimeBuilder_ == null) { - result.revisionCreateTime_ = revisionCreateTime_; - } else { - result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.serviceAccount_ = serviceAccount_; - if (sourceCodeCase_ == 10) { - result.sourceCode_ = sourceCode_; - } - result.sourceCodeCase_ = sourceCodeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1.Workflow) { - return mergeFrom((com.google.cloud.workflows.v1.Workflow) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1.Workflow other) { - if (other == com.google.cloud.workflows.v1.Workflow.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasRevisionCreateTime()) { - mergeRevisionCreateTime(other.getRevisionCreateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (!other.getServiceAccount().isEmpty()) { - serviceAccount_ = other.serviceAccount_; - onChanged(); - } - switch (other.getSourceCodeCase()) { - case SOURCE_CONTENTS: - { - sourceCodeCase_ = 10; - sourceCode_ = other.sourceCode_; - onChanged(); - break; - } - case SOURCECODE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - - break; - } // case 24 - case 34: - { - revisionId_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - case 50: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 50 - case 58: - { - input.readMessage( - getRevisionCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 58 - case 66: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - break; - } // case 66 - case 74: - { - serviceAccount_ = input.readStringRequireUtf8(); - - break; - } // case 74 - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - sourceCodeCase_ = 10; - sourceCode_ = s; - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int sourceCodeCase_ = 0; - private java.lang.Object sourceCode_; - - public SourceCodeCase getSourceCodeCase() { - return SourceCodeCase.forNumber(sourceCodeCase_); - } - - public Builder clearSourceCode() { - sourceCodeCase_ = 0; - sourceCode_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The resource name of the workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource name of the workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 java.lang.Object description_ = ""; - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.workflows.v1.Workflow.State result = - com.google.cloud.workflows.v1.Workflow.State.valueOf(state_); - return result == null ? com.google.cloud.workflows.v1.Workflow.State.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.workflows.v1.Workflow.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following properties of a workflow:
-     * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-     * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following properties of a workflow:
-     * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-     * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following properties of a workflow:
-     * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-     * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - revisionId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following properties of a workflow:
-     * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-     * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - - revisionId_ = getDefaultInstance().getRevisionId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following properties of a workflow:
-     * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-     * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - revisionId_ = 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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.Timestamp revisionCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - revisionCreateTimeBuilder_; - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the revisionCreateTime field is set. - */ - public boolean hasRevisionCreateTime() { - return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The revisionCreateTime. - */ - public com.google.protobuf.Timestamp getRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - return revisionCreateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : revisionCreateTime_; - } else { - return revisionCreateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revisionCreateTime_ = value; - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = builderForValue.build(); - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (revisionCreateTime_ != null) { - revisionCreateTime_ = - com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - revisionCreateTime_ = value; - } - onChanged(); - } else { - revisionCreateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - onChanged(); - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { - - onChanged(); - return getRevisionCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - if (revisionCreateTimeBuilder_ != null) { - return revisionCreateTimeBuilder_.getMessageOrBuilder(); - } else { - return revisionCreateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : revisionCreateTime_; - } - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getRevisionCreateTimeFieldBuilder() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getRevisionCreateTime(), getParentForChildren(), isClean()); - revisionCreateTime_ = null; - } - return revisionCreateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged(); - ; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableLabels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private java.lang.Object serviceAccount_ = ""; - /** - * - * - *
-     * The service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account} or {account}
-     * Using `-` as a wildcard for the `{project}` or not providing one at all
-     * will infer the project from the account. The `{account}` value can be the
-     * `email` address or the `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - } - /** - * - * - *
-     * The service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account} or {account}
-     * Using `-` as a wildcard for the `{project}` or not providing one at all
-     * will infer the project from the account. The `{account}` value can be the
-     * `email` address or the `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - } - /** - * - * - *
-     * The service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account} or {account}
-     * Using `-` as a wildcard for the `{project}` or not providing one at all
-     * will infer the project from the account. The `{account}` value can be the
-     * `email` address or the `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - /** - * - * - *
-     * The service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account} or {account}
-     * Using `-` as a wildcard for the `{project}` or not providing one at all
-     * will infer the project from the account. The `{account}` value can be the
-     * `email` address or the `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccount() { - - serviceAccount_ = getDefaultInstance().getServiceAccount(); - onChanged(); - return this; - } - /** - * - * - *
-     * The service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account} or {account}
-     * Using `-` as a wildcard for the `{project}` or not providing one at all
-     * will infer the project from the account. The `{account}` value can be the
-     * `email` address or the `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - - /** - * - * - *
-     * Workflow code to be executed. The size limit is 128KB.
-     * 
- * - * string source_contents = 10; - * - * @return Whether the sourceContents field is set. - */ - @java.lang.Override - public boolean hasSourceContents() { - return sourceCodeCase_ == 10; - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 128KB.
-     * 
- * - * string source_contents = 10; - * - * @return The sourceContents. - */ - @java.lang.Override - public java.lang.String getSourceContents() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCodeCase_ == 10) { - sourceCode_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 128KB.
-     * 
- * - * string source_contents = 10; - * - * @return The bytes for sourceContents. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSourceContentsBytes() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (sourceCodeCase_ == 10) { - sourceCode_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 128KB.
-     * 
- * - * string source_contents = 10; - * - * @param value The sourceContents to set. - * @return This builder for chaining. - */ - public Builder setSourceContents(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCodeCase_ = 10; - sourceCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 128KB.
-     * 
- * - * string source_contents = 10; - * - * @return This builder for chaining. - */ - public Builder clearSourceContents() { - if (sourceCodeCase_ == 10) { - sourceCodeCase_ = 0; - sourceCode_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 128KB.
-     * 
- * - * string source_contents = 10; - * - * @param value The bytes for sourceContents to set. - * @return This builder for chaining. - */ - public Builder setSourceContentsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCodeCase_ = 10; - sourceCode_ = 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.workflows.v1.Workflow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1.Workflow) - private static final com.google.cloud.workflows.v1.Workflow DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1.Workflow(); - } - - public static com.google.cloud.workflows.v1.Workflow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Workflow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1.Workflow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowName.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowName.java deleted file mode 100644 index b6c25004..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.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 WorkflowName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_WORKFLOW = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/workflows/{workflow}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String workflow; - - @Deprecated - protected WorkflowName() { - project = null; - location = null; - workflow = null; - } - - private WorkflowName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - workflow = Preconditions.checkNotNull(builder.getWorkflow()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getWorkflow() { - return workflow; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static WorkflowName of(String project, String location, String workflow) { - return newBuilder().setProject(project).setLocation(location).setWorkflow(workflow).build(); - } - - public static String format(String project, String location, String workflow) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setWorkflow(workflow) - .build() - .toString(); - } - - public static WorkflowName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_WORKFLOW.validatedMatch( - formattedString, "WorkflowName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow")); - } - - 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 (WorkflowName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_WORKFLOW.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 (workflow != null) { - fieldMapBuilder.put("workflow", workflow); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_WORKFLOW.instantiate( - "project", project, "location", location, "workflow", workflow); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - WorkflowName that = ((WorkflowName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.workflow, that.workflow); - } - 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(workflow); - return h; - } - - /** Builder for projects/{project}/locations/{location}/workflows/{workflow}. */ - public static class Builder { - private String project; - private String location; - private String workflow; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getWorkflow() { - return workflow; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setWorkflow(String workflow) { - this.workflow = workflow; - return this; - } - - private Builder(WorkflowName workflowName) { - this.project = workflowName.project; - this.location = workflowName.location; - this.workflow = workflowName.workflow; - } - - public WorkflowName build() { - return new WorkflowName(this); - } - } -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowOrBuilder.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowOrBuilder.java deleted file mode 100644 index 7eb0533f..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowOrBuilder.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public interface WorkflowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1.Workflow) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name of the workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name of the workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.workflows.v1.Workflow.State getState(); - - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following properties of a workflow:
-   * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-   * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following properties of a workflow:
-   * - [Service account][google.cloud.workflows.v1.Workflow.service_account]
-   * - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents]
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString getRevisionIdBytes(); - - /** - * - * - *
-   * Output only. The timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The last update timestamp of the workflow.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The last update timestamp of the workflow.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The last update timestamp of the workflow.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the revisionCreateTime field is set. - */ - boolean hasRevisionCreateTime(); - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The revisionCreateTime. - */ - com.google.protobuf.Timestamp getRevisionCreateTime(); - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); - - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - int getLabelsCount(); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * The service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account} or {account}
-   * Using `-` as a wildcard for the `{project}` or not providing one at all
-   * will infer the project from the account. The `{account}` value can be the
-   * `email` address or the `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @return The serviceAccount. - */ - java.lang.String getServiceAccount(); - /** - * - * - *
-   * The service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account} or {account}
-   * Using `-` as a wildcard for the `{project}` or not providing one at all
-   * will infer the project from the account. The `{account}` value can be the
-   * `email` address or the `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @return The bytes for serviceAccount. - */ - com.google.protobuf.ByteString getServiceAccountBytes(); - - /** - * - * - *
-   * Workflow code to be executed. The size limit is 128KB.
-   * 
- * - * string source_contents = 10; - * - * @return Whether the sourceContents field is set. - */ - boolean hasSourceContents(); - /** - * - * - *
-   * Workflow code to be executed. The size limit is 128KB.
-   * 
- * - * string source_contents = 10; - * - * @return The sourceContents. - */ - java.lang.String getSourceContents(); - /** - * - * - *
-   * Workflow code to be executed. The size limit is 128KB.
-   * 
- * - * string source_contents = 10; - * - * @return The bytes for sourceContents. - */ - com.google.protobuf.ByteString getSourceContentsBytes(); - - public com.google.cloud.workflows.v1.Workflow.SourceCodeCase getSourceCodeCase(); -} diff --git a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowsProto.java b/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowsProto.java deleted file mode 100644 index 5b8d5611..00000000 --- a/proto-google-cloud-workflows-v1/src/main/java/com/google/cloud/workflows/v1/WorkflowsProto.java +++ /dev/null @@ -1,269 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1/workflows.proto - -package com.google.cloud.workflows.v1; - -public final class WorkflowsProto { - private WorkflowsProto() {} - - 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_workflows_v1_Workflow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_Workflow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_GetWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_GetWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_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/workflows/v1/workflows.pr" - + "oto\022\031google.cloud.workflows.v1\032\034google/a" - + "pi/annotations.proto\032\027google/api/client." - + "proto\032\037google/api/field_behavior.proto\032\031" - + "google/api/resource.proto\032#google/longru" - + "nning/operations.proto\032 google/protobuf/" - + "field_mask.proto\032\037google/protobuf/timest" - + "amp.proto\"\366\004\n\010Workflow\022\014\n\004name\030\001 \001(\t\022\023\n\013" - + "description\030\002 \001(\t\022=\n\005state\030\003 \001(\0162).googl" - + "e.cloud.workflows.v1.Workflow.StateB\003\340A\003" - + "\022\030\n\013revision_id\030\004 \001(\tB\003\340A\003\0224\n\013create_tim" - + "e\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\024revision_create_time\030\007" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022?\n" - + "\006labels\030\010 \003(\0132/.google.cloud.workflows.v" - + "1.Workflow.LabelsEntry\022\027\n\017service_accoun" - + "t\030\t \001(\t\022\031\n\017source_contents\030\n \001(\tH\000\032-\n\013La" - + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001\"*\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACT" - + "IVE\020\001:d\352Aa\n!workflows.googleapis.com/Wor" - + "kflow\022\202\323\344\223\002/\022-/v1/{parent=projec" - + "ts/*/locations/*}/workflows\332A\006parent\022\237\001\n" - + "\013GetWorkflow\022-.google.cloud.workflows.v1" - + ".GetWorkflowRequest\032#.google.cloud.workf" - + "lows.v1.Workflow\"<\202\323\344\223\002/\022-/v1/{name=proj" - + "ects/*/locations/*/workflows/*}\332A\004name\022\340" - + "\001\n\016CreateWorkflow\0220.google.cloud.workflo" - + "ws.v1.CreateWorkflowRequest\032\035.google.lon" - + "grunning.Operation\"}\202\323\344\223\0029\"-/v1/{parent=" - + "projects/*/locations/*}/workflows:\010workf" - + "low\332A\033parent,workflow,workflow_id\312A\035\n\010Wo" - + "rkflow\022\021OperationMetadata\022\314\001\n\016DeleteWork" - + "flow\0220.google.cloud.workflows.v1.DeleteW" - + "orkflowRequest\032\035.google.longrunning.Oper" - + "ation\"i\202\323\344\223\002/*-/v1/{name=projects/*/loca" - + "tions/*/workflows/*}\332A\004name\312A*\n\025google.p" - + "rotobuf.Empty\022\021OperationMetadata\022\342\001\n\016Upd" - + "ateWorkflow\0220.google.cloud.workflows.v1." - + "UpdateWorkflowRequest\032\035.google.longrunni" - + "ng.Operation\"\177\202\323\344\223\002B26/v1/{workflow.name" - + "=projects/*/locations/*/workflows/*}:\010wo" - + "rkflow\332A\024workflow,update_mask\312A\035\n\010Workfl" - + "ow\022\021OperationMetadata\032L\312A\030workflows.goog" - + "leapis.com\322A.https://www.googleapis.com/" - + "auth/cloud-platformBu\n\035com.google.cloud." - + "workflows.v1B\016WorkflowsProtoP\001ZBgoogle.g" - + "olang.org/genproto/googleapis/cloud/work" - + "flows/v1;workflowsb\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_workflows_v1_Workflow_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_workflows_v1_Workflow_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_Workflow_descriptor, - new java.lang.String[] { - "Name", - "Description", - "State", - "RevisionId", - "CreateTime", - "UpdateTime", - "RevisionCreateTime", - "Labels", - "ServiceAccount", - "SourceContents", - "SourceCode", - }); - internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_descriptor = - internal_static_google_cloud_workflows_v1_Workflow_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_Workflow_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_ListWorkflowsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_ListWorkflowsResponse_descriptor, - new java.lang.String[] { - "Workflows", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_workflows_v1_GetWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_workflows_v1_GetWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_GetWorkflowRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_CreateWorkflowRequest_descriptor, - new java.lang.String[] { - "Parent", "Workflow", "WorkflowId", - }); - internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_DeleteWorkflowRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_UpdateWorkflowRequest_descriptor, - new java.lang.String[] { - "Workflow", "UpdateMask", - }); - internal_static_google_cloud_workflows_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_workflows_v1_OperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1_OperationMetadata_descriptor, - new java.lang.String[] { - "CreateTime", "EndTime", "Target", "Verb", "ApiVersion", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.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-workflows-v1/src/main/proto/google/cloud/workflows/v1/workflows.proto b/proto-google-cloud-workflows-v1/src/main/proto/google/cloud/workflows/v1/workflows.proto deleted file mode 100644 index 0b14cb30..00000000 --- a/proto-google-cloud-workflows-v1/src/main/proto/google/cloud/workflows/v1/workflows.proto +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.workflows.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/workflows/v1;workflows"; -option java_multiple_files = true; -option java_outer_classname = "WorkflowsProto"; -option java_package = "com.google.cloud.workflows.v1"; - -// Workflows is used to deploy and execute workflow programs. -// Workflows makes sure the program executes reliably, despite hardware and -// networking interruptions. -service Workflows { - option (google.api.default_host) = "workflows.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists Workflows in a given project and location. - // The default order is not specified. - rpc ListWorkflows(ListWorkflowsRequest) returns (ListWorkflowsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/workflows" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single Workflow. - rpc GetWorkflow(GetWorkflowRequest) returns (Workflow) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new workflow. If a workflow with the specified name already - // exists in the specified project and location, the long running operation - // will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - rpc CreateWorkflow(CreateWorkflowRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/workflows" - body: "workflow" - }; - option (google.api.method_signature) = "parent,workflow,workflow_id"; - option (google.longrunning.operation_info) = { - response_type: "Workflow" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a workflow with the specified name. - // This method also cancels and deletes all running executions of the - // workflow. - rpc DeleteWorkflow(DeleteWorkflowRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Updates an existing workflow. - // Running this method has no impact on already running executions of the - // workflow. A new revision of the workflow may be created as a result of a - // successful update operation. In that case, such revision will be used - // in new workflow executions. - rpc UpdateWorkflow(UpdateWorkflowRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{workflow.name=projects/*/locations/*/workflows/*}" - body: "workflow" - }; - option (google.api.method_signature) = "workflow,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Workflow" - metadata_type: "OperationMetadata" - }; - } -} - -// Workflow program to be executed by Workflows. -message Workflow { - option (google.api.resource) = { - type: "workflows.googleapis.com/Workflow" - pattern: "projects/{project}/locations/{location}/workflows/{workflow}" - }; - - // Describes the current state of workflow deployment. More states may be - // added in the future. - enum State { - // Invalid state. - STATE_UNSPECIFIED = 0; - - // The workflow has been deployed successfully and is serving. - ACTIVE = 1; - } - - // The resource name of the workflow. - // Format: projects/{project}/locations/{location}/workflows/{workflow} - string name = 1; - - // Description of the workflow provided by the user. - // Must be at most 1000 unicode characters long. - string description = 2; - - // Output only. State of the workflow deployment. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The revision of the workflow. - // A new revision of a workflow is created as a result of updating the - // following properties of a workflow: - // - // - [Service account][google.cloud.workflows.v1.Workflow.service_account] - // - [Workflow code to be executed][google.cloud.workflows.v1.Workflow.source_contents] - // - // The format is "000001-a4d", where the first 6 characters define - // the zero-padded revision ordinal number. They are followed by a hyphen and - // 3 hexadecimal random characters. - string revision_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The timestamp of when the workflow was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update timestamp of the workflow. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The timestamp that the latest revision of the workflow - // was created. - google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels associated with this workflow. - // Labels can contain at most 64 entries. Keys and values can be no longer - // than 63 characters and can only contain lowercase letters, numeric - // characters, underscores and dashes. Label keys must start with a letter. - // International characters are allowed. - map labels = 8; - - // The service account associated with the latest workflow version. - // This service account represents the identity of the workflow and determines - // what permissions the workflow has. - // Format: projects/{project}/serviceAccounts/{account} or {account} - // - // Using `-` as a wildcard for the `{project}` or not providing one at all - // will infer the project from the account. The `{account}` value can be the - // `email` address or the `unique_id` of the service account. - // - // If not provided, workflow will use the project's default service account. - // Modifying this field for an existing workflow results in a new workflow - // revision. - string service_account = 9; - - // Required. Location of the workflow source code. - // Modifying this field for an existing workflow results in a new workflow - // revision. - oneof source_code { - // Workflow code to be executed. The size limit is 128KB. - string source_contents = 10; - } -} - -// Request for the -// [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows] -// method. -message ListWorkflowsRequest { - // Required. Project and location from which the workflows should be listed. - // Format: projects/{project}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Maximum number of workflows to return per call. The service may return - // fewer than this value. If the value is not specified, a default value of - // 500 will be used. The maximum permitted value is 1000 and values greater - // than 1000 will be coerced down to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListWorkflows` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListWorkflows` must - // match the call that provided the page token. - string page_token = 3; - - // Filter to restrict results to specific workflows. - string filter = 4; - - // Comma-separated list of fields that that specify the order of the results. - // Default sorting order for a field is ascending. To specify descending order - // for a field, append a " desc" suffix. - // If not specified, the results will be returned in an unspecified order. - string order_by = 5; -} - -// Response for the -// [ListWorkflows][google.cloud.workflows.v1.Workflows.ListWorkflows] -// method. -message ListWorkflowsResponse { - // The workflows which match the request. - repeated Workflow workflows = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Unreachable resources. - repeated string unreachable = 3; -} - -// Request for the -// [GetWorkflow][google.cloud.workflows.v1.Workflows.GetWorkflow] method. -message GetWorkflowRequest { - // Required. Name of the workflow which information should be retrieved. - // Format: projects/{project}/locations/{location}/workflows/{workflow} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "workflows.googleapis.com/Workflow" - } - ]; -} - -// Request for the -// [CreateWorkflow][google.cloud.workflows.v1.Workflows.CreateWorkflow] -// method. -message CreateWorkflowRequest { - // Required. Project and location in which the workflow should be created. - // Format: projects/{project}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. Workflow to be created. - Workflow workflow = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID of the workflow to be created. It has to fulfill the - // following requirements: - // - // * Must contain only letters, numbers, underscores and hyphens. - // * Must start with a letter. - // * Must be between 1-64 characters. - // * Must end with a number or a letter. - // * Must be unique within the customer project and location. - string workflow_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the -// [DeleteWorkflow][google.cloud.workflows.v1.Workflows.DeleteWorkflow] -// method. -message DeleteWorkflowRequest { - // Required. Name of the workflow to be deleted. - // Format: projects/{project}/locations/{location}/workflows/{workflow} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "workflows.googleapis.com/Workflow" - } - ]; -} - -// Request for the -// [UpdateWorkflow][google.cloud.workflows.v1.Workflows.UpdateWorkflow] -// method. -message UpdateWorkflowRequest { - // Required. Workflow to be updated. - Workflow workflow = 1 [(google.api.field_behavior) = REQUIRED]; - - // List of fields to be updated. If not present, the entire workflow - // will be updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Server-defined resource path for the target of the operation. - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // API version used to start the operation. - string api_version = 5; -} diff --git a/proto-google-cloud-workflows-v1beta/clirr-ignored-differences.xml b/proto-google-cloud-workflows-v1beta/clirr-ignored-differences.xml deleted file mode 100644 index f4495b32..00000000 --- a/proto-google-cloud-workflows-v1beta/clirr-ignored-differences.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 7012 - com/google/cloud/workflows/v1beta/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/workflows/v1beta/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/workflows/v1beta/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-cloud-workflows-v1beta/pom.xml b/proto-google-cloud-workflows-v1beta/pom.xml deleted file mode 100644 index cd9054c1..00000000 --- a/proto-google-cloud-workflows-v1beta/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-workflows-v1beta - 0.9.7-SNAPSHOT - proto-google-cloud-workflows-v1beta - Proto library for google-cloud-workflows - - com.google.cloud - google-cloud-workflows-parent - 2.3.7-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequest.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequest.java deleted file mode 100644 index 3b59c843..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequest.java +++ /dev/null @@ -1,1152 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Request for the
- * [CreateWorkflow][google.cloud.workflows.v1beta.Workflows.CreateWorkflow]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.CreateWorkflowRequest} - */ -public final class CreateWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.CreateWorkflowRequest) - CreateWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateWorkflowRequest.newBuilder() to construct. - private CreateWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateWorkflowRequest() { - parent_ = ""; - workflowId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest.class, - com.google.cloud.workflows.v1beta.CreateWorkflowRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WORKFLOW_FIELD_NUMBER = 2; - private com.google.cloud.workflows.v1beta.Workflow workflow_; - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - @java.lang.Override - public boolean hasWorkflow() { - return workflow_ != null; - } - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow getWorkflow() { - return workflow_ == null - ? com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance() - : workflow_; - } - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder() { - return getWorkflow(); - } - - public static final int WORKFLOW_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object workflowId_; - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The workflowId. - */ - @java.lang.Override - public java.lang.String getWorkflowId() { - java.lang.Object ref = workflowId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - workflowId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for workflowId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getWorkflowIdBytes() { - java.lang.Object ref = workflowId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - workflowId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (workflow_ != null) { - output.writeMessage(2, getWorkflow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workflowId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, workflowId_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (workflow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getWorkflow()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workflowId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, workflowId_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.CreateWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.CreateWorkflowRequest other = - (com.google.cloud.workflows.v1beta.CreateWorkflowRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasWorkflow() != other.hasWorkflow()) return false; - if (hasWorkflow()) { - if (!getWorkflow().equals(other.getWorkflow())) return false; - } - if (!getWorkflowId().equals(other.getWorkflowId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasWorkflow()) { - hash = (37 * hash) + WORKFLOW_FIELD_NUMBER; - hash = (53 * hash) + getWorkflow().hashCode(); - } - hash = (37 * hash) + WORKFLOW_ID_FIELD_NUMBER; - hash = (53 * hash) + getWorkflowId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [CreateWorkflow][google.cloud.workflows.v1beta.Workflows.CreateWorkflow]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.CreateWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.CreateWorkflowRequest) - com.google.cloud.workflows.v1beta.CreateWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.CreateWorkflowRequest.class, - com.google.cloud.workflows.v1beta.CreateWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.CreateWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (workflowBuilder_ == null) { - workflow_ = null; - } else { - workflow_ = null; - workflowBuilder_ = null; - } - workflowId_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.CreateWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.CreateWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.CreateWorkflowRequest build() { - com.google.cloud.workflows.v1beta.CreateWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.CreateWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1beta.CreateWorkflowRequest result = - new com.google.cloud.workflows.v1beta.CreateWorkflowRequest(this); - result.parent_ = parent_; - if (workflowBuilder_ == null) { - result.workflow_ = workflow_; - } else { - result.workflow_ = workflowBuilder_.build(); - } - result.workflowId_ = workflowId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1beta.CreateWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1beta.CreateWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.CreateWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1beta.CreateWorkflowRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasWorkflow()) { - mergeWorkflow(other.getWorkflow()); - } - if (!other.getWorkflowId().isEmpty()) { - workflowId_ = other.workflowId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getWorkflowFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - workflowId_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location in which the workflow should be created.
-     * Format:  projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private com.google.cloud.workflows.v1beta.Workflow workflow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder> - workflowBuilder_; - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - public boolean hasWorkflow() { - return workflowBuilder_ != null || workflow_ != null; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - public com.google.cloud.workflows.v1beta.Workflow getWorkflow() { - if (workflowBuilder_ == null) { - return workflow_ == null - ? com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance() - : workflow_; - } else { - return workflowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - workflow_ = value; - onChanged(); - } else { - workflowBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1beta.Workflow.Builder builderForValue) { - if (workflowBuilder_ == null) { - workflow_ = builderForValue.build(); - onChanged(); - } else { - workflowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeWorkflow(com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowBuilder_ == null) { - if (workflow_ != null) { - workflow_ = - com.google.cloud.workflows.v1beta.Workflow.newBuilder(workflow_) - .mergeFrom(value) - .buildPartial(); - } else { - workflow_ = value; - } - onChanged(); - } else { - workflowBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearWorkflow() { - if (workflowBuilder_ == null) { - workflow_ = null; - onChanged(); - } else { - workflow_ = null; - workflowBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1beta.Workflow.Builder getWorkflowBuilder() { - - onChanged(); - return getWorkflowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder() { - if (workflowBuilder_ != null) { - return workflowBuilder_.getMessageOrBuilder(); - } else { - return workflow_ == null - ? com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance() - : workflow_; - } - } - /** - * - * - *
-     * Required. Workflow to be created.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder> - getWorkflowFieldBuilder() { - if (workflowBuilder_ == null) { - workflowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder>( - getWorkflow(), getParentForChildren(), isClean()); - workflow_ = null; - } - return workflowBuilder_; - } - - private java.lang.Object workflowId_ = ""; - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The workflowId. - */ - public java.lang.String getWorkflowId() { - java.lang.Object ref = workflowId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - workflowId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for workflowId. - */ - public com.google.protobuf.ByteString getWorkflowIdBytes() { - java.lang.Object ref = workflowId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - workflowId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The workflowId to set. - * @return This builder for chaining. - */ - public Builder setWorkflowId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - workflowId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearWorkflowId() { - - workflowId_ = getDefaultInstance().getWorkflowId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The ID of the workflow to be created. It has to fulfill the
-     * following requirements:
-     * * Must contain only letters, numbers, underscores and hyphens.
-     * * Must start with a letter.
-     * * Must be between 1-64 characters.
-     * * Must end with a number or a letter.
-     * * Must be unique within the customer project and location.
-     * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for workflowId to set. - * @return This builder for chaining. - */ - public Builder setWorkflowIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - workflowId_ = 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.workflows.v1beta.CreateWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.CreateWorkflowRequest) - private static final com.google.cloud.workflows.v1beta.CreateWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.CreateWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1beta.CreateWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.CreateWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequestOrBuilder.java deleted file mode 100644 index 83e33042..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface CreateWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.CreateWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Project and location in which the workflow should be created.
-   * Format:  projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - boolean hasWorkflow(); - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - com.google.cloud.workflows.v1beta.Workflow getWorkflow(); - /** - * - * - *
-   * Required. Workflow to be created.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder(); - - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The workflowId. - */ - java.lang.String getWorkflowId(); - /** - * - * - *
-   * Required. The ID of the workflow to be created. It has to fulfill the
-   * following requirements:
-   * * Must contain only letters, numbers, underscores and hyphens.
-   * * Must start with a letter.
-   * * Must be between 1-64 characters.
-   * * Must end with a number or a letter.
-   * * Must be unique within the customer project and location.
-   * 
- * - * string workflow_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for workflowId. - */ - com.google.protobuf.ByteString getWorkflowIdBytes(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequest.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequest.java deleted file mode 100644 index a44f0d9b..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequest.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Request for the
- * [DeleteWorkflow][google.cloud.workflows.v1beta.Workflows.DeleteWorkflow]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.DeleteWorkflowRequest} - */ -public final class DeleteWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.DeleteWorkflowRequest) - DeleteWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteWorkflowRequest.newBuilder() to construct. - private DeleteWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteWorkflowRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.class, - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.DeleteWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest other = - (com.google.cloud.workflows.v1beta.DeleteWorkflowRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [DeleteWorkflow][google.cloud.workflows.v1beta.Workflows.DeleteWorkflow]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.DeleteWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.DeleteWorkflowRequest) - com.google.cloud.workflows.v1beta.DeleteWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.class, - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.DeleteWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.DeleteWorkflowRequest build() { - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.DeleteWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1beta.DeleteWorkflowRequest result = - new com.google.cloud.workflows.v1beta.DeleteWorkflowRequest(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.workflows.v1beta.DeleteWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1beta.DeleteWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.DeleteWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1beta.DeleteWorkflowRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow to be deleted.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.DeleteWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.DeleteWorkflowRequest) - private static final com.google.cloud.workflows.v1beta.DeleteWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.DeleteWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1beta.DeleteWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.DeleteWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequestOrBuilder.java deleted file mode 100644 index c94cc12f..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface DeleteWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.DeleteWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the workflow to be deleted.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequest.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequest.java deleted file mode 100644 index 98d81213..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequest.java +++ /dev/null @@ -1,638 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Request for the
- * [GetWorkflow][google.cloud.workflows.v1beta.Workflows.GetWorkflow] method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.GetWorkflowRequest} - */ -public final class GetWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.GetWorkflowRequest) - GetWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetWorkflowRequest.newBuilder() to construct. - private GetWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetWorkflowRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.GetWorkflowRequest.class, - com.google.cloud.workflows.v1beta.GetWorkflowRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.GetWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.GetWorkflowRequest other = - (com.google.cloud.workflows.v1beta.GetWorkflowRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1beta.GetWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [GetWorkflow][google.cloud.workflows.v1beta.Workflows.GetWorkflow] method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.GetWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.GetWorkflowRequest) - com.google.cloud.workflows.v1beta.GetWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.GetWorkflowRequest.class, - com.google.cloud.workflows.v1beta.GetWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.GetWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.GetWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.GetWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.GetWorkflowRequest build() { - com.google.cloud.workflows.v1beta.GetWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.GetWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1beta.GetWorkflowRequest result = - new com.google.cloud.workflows.v1beta.GetWorkflowRequest(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.workflows.v1beta.GetWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1beta.GetWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.GetWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1beta.GetWorkflowRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of the workflow which information should be retrieved.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.GetWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.GetWorkflowRequest) - private static final com.google.cloud.workflows.v1beta.GetWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.GetWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1beta.GetWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.GetWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequestOrBuilder.java deleted file mode 100644 index de022af8..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface GetWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.GetWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the workflow which information should be retrieved.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequest.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequest.java deleted file mode 100644 index 9f7b2144..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequest.java +++ /dev/null @@ -1,1320 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Request for the
- * [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.ListWorkflowsRequest} - */ -public final class ListWorkflowsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.ListWorkflowsRequest) - ListWorkflowsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListWorkflowsRequest.newBuilder() to construct. - private ListWorkflowsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListWorkflowsRequest() { - parent_ = ""; - pageToken_ = ""; - filter_ = ""; - orderBy_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListWorkflowsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest.class, - com.google.cloud.workflows.v1beta.ListWorkflowsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_; - /** - * - * - *
-   * Maximum number of workflows to return per call. The service may return
-   * fewer than this value. If the value is not specified, a default value of
-   * 500 will be used. The maximum permitted value is 1000 and values greater
-   * than 1000 will be coerced down to 1000.
-   * 
- * - * 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_; - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * 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; - } - } - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 4; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ORDER_BY_FIELD_NUMBER = 5; - private volatile java.lang.Object orderBy_; - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The orderBy. - */ - @java.lang.Override - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } - } - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The bytes for orderBy. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.ListWorkflowsRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.ListWorkflowsRequest other = - (com.google.cloud.workflows.v1beta.ListWorkflowsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getOrderBy().equals(other.getOrderBy())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; - hash = (53 * hash) + getOrderBy().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.ListWorkflowsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.ListWorkflowsRequest) - com.google.cloud.workflows.v1beta.ListWorkflowsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.ListWorkflowsRequest.class, - com.google.cloud.workflows.v1beta.ListWorkflowsRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.ListWorkflowsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - filter_ = ""; - - orderBy_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.ListWorkflowsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsRequest build() { - com.google.cloud.workflows.v1beta.ListWorkflowsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsRequest buildPartial() { - com.google.cloud.workflows.v1beta.ListWorkflowsRequest result = - new com.google.cloud.workflows.v1beta.ListWorkflowsRequest(this); - result.parent_ = parent_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - result.filter_ = filter_; - result.orderBy_ = orderBy_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1beta.ListWorkflowsRequest) { - return mergeFrom((com.google.cloud.workflows.v1beta.ListWorkflowsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.ListWorkflowsRequest other) { - if (other == com.google.cloud.workflows.v1beta.ListWorkflowsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getOrderBy().isEmpty()) { - orderBy_ = other.orderBy_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - filter_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - orderBy_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project and location from which the workflows should be listed.
-     * Format: projects/{project}/locations/{location}
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Maximum number of workflows to return per call. The service may return
-     * fewer than this value. If the value is not specified, a default value of
-     * 500 will be used. The maximum permitted value is 1000 and values greater
-     * than 1000 will be coerced down to 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Maximum number of workflows to return per call. The service may return
-     * fewer than this value. If the value is not specified, a default value of
-     * 500 will be used. The maximum permitted value is 1000 and values greater
-     * than 1000 will be coerced down to 1000.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Maximum number of workflows to return per call. The service may return
-     * fewer than this value. If the value is not specified, a default value of
-     * 500 will be used. The maximum permitted value is 1000 and values greater
-     * than 1000 will be coerced down to 1000.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * 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; - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token, received from a previous `ListWorkflows` call.
-     * Provide this to retrieve the subsequent page.
-     * When paginating, all other parameters provided to `ListWorkflows` must
-     * match the call that provided the page token.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Filter to restrict results to specific workflows.
-     * 
- * - * string filter = 4; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object orderBy_ = ""; - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @return The orderBy. - */ - public java.lang.String getOrderBy() { - java.lang.Object ref = orderBy_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - orderBy_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @return The bytes for orderBy. - */ - public com.google.protobuf.ByteString getOrderByBytes() { - java.lang.Object ref = orderBy_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - orderBy_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @param value The orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - orderBy_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @return This builder for chaining. - */ - public Builder clearOrderBy() { - - orderBy_ = getDefaultInstance().getOrderBy(); - onChanged(); - return this; - } - /** - * - * - *
-     * Comma-separated list of fields that that specify the order of the results.
-     * Default sorting order for a field is ascending. To specify descending order
-     * for a field, append a " desc" suffix.
-     * If not specified, the results will be returned in an unspecified order.
-     * 
- * - * string order_by = 5; - * - * @param value The bytes for orderBy to set. - * @return This builder for chaining. - */ - public Builder setOrderByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - orderBy_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.ListWorkflowsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.ListWorkflowsRequest) - private static final com.google.cloud.workflows.v1beta.ListWorkflowsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.ListWorkflowsRequest(); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListWorkflowsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequestOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequestOrBuilder.java deleted file mode 100644 index ac745569..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequestOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface ListWorkflowsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.ListWorkflowsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Project and location from which the workflows should be listed.
-   * Format: projects/{project}/locations/{location}
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Maximum number of workflows to return per call. The service may return
-   * fewer than this value. If the value is not specified, a default value of
-   * 500 will be used. The maximum permitted value is 1000 and values greater
-   * than 1000 will be coerced down to 1000.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A page token, received from a previous `ListWorkflows` call.
-   * Provide this to retrieve the subsequent page.
-   * When paginating, all other parameters provided to `ListWorkflows` must
-   * match the call that provided the page token.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Filter to restrict results to specific workflows.
-   * 
- * - * string filter = 4; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The orderBy. - */ - java.lang.String getOrderBy(); - /** - * - * - *
-   * Comma-separated list of fields that that specify the order of the results.
-   * Default sorting order for a field is ascending. To specify descending order
-   * for a field, append a " desc" suffix.
-   * If not specified, the results will be returned in an unspecified order.
-   * 
- * - * string order_by = 5; - * - * @return The bytes for orderBy. - */ - com.google.protobuf.ByteString getOrderByBytes(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponse.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponse.java deleted file mode 100644 index 16370c3e..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponse.java +++ /dev/null @@ -1,1388 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Response for the
- * [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.ListWorkflowsResponse} - */ -public final class ListWorkflowsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.ListWorkflowsResponse) - ListWorkflowsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListWorkflowsResponse.newBuilder() to construct. - private ListWorkflowsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListWorkflowsResponse() { - workflows_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListWorkflowsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.ListWorkflowsResponse.class, - com.google.cloud.workflows.v1beta.ListWorkflowsResponse.Builder.class); - } - - public static final int WORKFLOWS_FIELD_NUMBER = 1; - private java.util.List workflows_; - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - @java.lang.Override - public java.util.List getWorkflowsList() { - return workflows_; - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - @java.lang.Override - public java.util.List - getWorkflowsOrBuilderList() { - return workflows_; - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - @java.lang.Override - public int getWorkflowsCount() { - return workflows_.size(); - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow getWorkflows(int index) { - return workflows_.get(index); - } - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowsOrBuilder(int index) { - return workflows_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNREACHABLE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList unreachable_; - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_; - } - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < workflows_.size(); i++) { - output.writeMessage(1, workflows_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - for (int i = 0; i < unreachable_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unreachable_.getRaw(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < workflows_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, workflows_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - { - int dataSize = 0; - for (int i = 0; i < unreachable_.size(); i++) { - dataSize += computeStringSizeNoTag(unreachable_.getRaw(i)); - } - size += dataSize; - size += 1 * getUnreachableList().size(); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.ListWorkflowsResponse)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.ListWorkflowsResponse other = - (com.google.cloud.workflows.v1beta.ListWorkflowsResponse) obj; - - if (!getWorkflowsList().equals(other.getWorkflowsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnreachableList().equals(other.getUnreachableList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getWorkflowsCount() > 0) { - hash = (37 * hash) + WORKFLOWS_FIELD_NUMBER; - hash = (53 * hash) + getWorkflowsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - if (getUnreachableCount() > 0) { - hash = (37 * hash) + UNREACHABLE_FIELD_NUMBER; - hash = (53 * hash) + getUnreachableList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.workflows.v1beta.ListWorkflowsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response for the
-   * [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.ListWorkflowsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.ListWorkflowsResponse) - com.google.cloud.workflows.v1beta.ListWorkflowsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.ListWorkflowsResponse.class, - com.google.cloud.workflows.v1beta.ListWorkflowsResponse.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.ListWorkflowsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (workflowsBuilder_ == null) { - workflows_ = java.util.Collections.emptyList(); - } else { - workflows_ = null; - workflowsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsResponse getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.ListWorkflowsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsResponse build() { - com.google.cloud.workflows.v1beta.ListWorkflowsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsResponse buildPartial() { - com.google.cloud.workflows.v1beta.ListWorkflowsResponse result = - new com.google.cloud.workflows.v1beta.ListWorkflowsResponse(this); - int from_bitField0_ = bitField0_; - if (workflowsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - workflows_ = java.util.Collections.unmodifiableList(workflows_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.workflows_ = workflows_; - } else { - result.workflows_ = workflowsBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - if (((bitField0_ & 0x00000002) != 0)) { - unreachable_ = unreachable_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.unreachable_ = unreachable_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1beta.ListWorkflowsResponse) { - return mergeFrom((com.google.cloud.workflows.v1beta.ListWorkflowsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.ListWorkflowsResponse other) { - if (other == com.google.cloud.workflows.v1beta.ListWorkflowsResponse.getDefaultInstance()) - return this; - if (workflowsBuilder_ == null) { - if (!other.workflows_.isEmpty()) { - if (workflows_.isEmpty()) { - workflows_ = other.workflows_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureWorkflowsIsMutable(); - workflows_.addAll(other.workflows_); - } - onChanged(); - } - } else { - if (!other.workflows_.isEmpty()) { - if (workflowsBuilder_.isEmpty()) { - workflowsBuilder_.dispose(); - workflowsBuilder_ = null; - workflows_ = other.workflows_; - bitField0_ = (bitField0_ & ~0x00000001); - workflowsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getWorkflowsFieldBuilder() - : null; - } else { - workflowsBuilder_.addAllMessages(other.workflows_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - if (!other.unreachable_.isEmpty()) { - if (unreachable_.isEmpty()) { - unreachable_ = other.unreachable_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureUnreachableIsMutable(); - unreachable_.addAll(other.unreachable_); - } - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.workflows.v1beta.Workflow m = - input.readMessage( - com.google.cloud.workflows.v1beta.Workflow.parser(), extensionRegistry); - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.add(m); - } else { - workflowsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureUnreachableIsMutable(); - unreachable_.add(s); - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List workflows_ = - java.util.Collections.emptyList(); - - private void ensureWorkflowsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - workflows_ = - new java.util.ArrayList(workflows_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder> - workflowsBuilder_; - - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public java.util.List getWorkflowsList() { - if (workflowsBuilder_ == null) { - return java.util.Collections.unmodifiableList(workflows_); - } else { - return workflowsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public int getWorkflowsCount() { - if (workflowsBuilder_ == null) { - return workflows_.size(); - } else { - return workflowsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1beta.Workflow getWorkflows(int index) { - if (workflowsBuilder_ == null) { - return workflows_.get(index); - } else { - return workflowsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder setWorkflows(int index, com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWorkflowsIsMutable(); - workflows_.set(index, value); - onChanged(); - } else { - workflowsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder setWorkflows( - int index, com.google.cloud.workflows.v1beta.Workflow.Builder builderForValue) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.set(index, builderForValue.build()); - onChanged(); - } else { - workflowsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder addWorkflows(com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWorkflowsIsMutable(); - workflows_.add(value); - onChanged(); - } else { - workflowsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder addWorkflows(int index, com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureWorkflowsIsMutable(); - workflows_.add(index, value); - onChanged(); - } else { - workflowsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder addWorkflows( - com.google.cloud.workflows.v1beta.Workflow.Builder builderForValue) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.add(builderForValue.build()); - onChanged(); - } else { - workflowsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder addWorkflows( - int index, com.google.cloud.workflows.v1beta.Workflow.Builder builderForValue) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.add(index, builderForValue.build()); - onChanged(); - } else { - workflowsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder addAllWorkflows( - java.lang.Iterable values) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, workflows_); - onChanged(); - } else { - workflowsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder clearWorkflows() { - if (workflowsBuilder_ == null) { - workflows_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - workflowsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public Builder removeWorkflows(int index) { - if (workflowsBuilder_ == null) { - ensureWorkflowsIsMutable(); - workflows_.remove(index); - onChanged(); - } else { - workflowsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1beta.Workflow.Builder getWorkflowsBuilder(int index) { - return getWorkflowsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowsOrBuilder(int index) { - if (workflowsBuilder_ == null) { - return workflows_.get(index); - } else { - return workflowsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public java.util.List - getWorkflowsOrBuilderList() { - if (workflowsBuilder_ != null) { - return workflowsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(workflows_); - } - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1beta.Workflow.Builder addWorkflowsBuilder() { - return getWorkflowsFieldBuilder() - .addBuilder(com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance()); - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public com.google.cloud.workflows.v1beta.Workflow.Builder addWorkflowsBuilder(int index) { - return getWorkflowsFieldBuilder() - .addBuilder(index, com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance()); - } - /** - * - * - *
-     * The workflows which match the request.
-     * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - public java.util.List - getWorkflowsBuilderList() { - return getWorkflowsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder> - getWorkflowsFieldBuilder() { - if (workflowsBuilder_ == null) { - workflowsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder>( - workflows_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - workflows_ = null; - } - return workflowsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList unreachable_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureUnreachableIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - unreachable_ = new com.google.protobuf.LazyStringArrayList(unreachable_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - public com.google.protobuf.ProtocolStringList getUnreachableList() { - return unreachable_.getUnmodifiableView(); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - public int getUnreachableCount() { - return unreachable_.size(); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - public java.lang.String getUnreachable(int index) { - return unreachable_.get(index); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - public com.google.protobuf.ByteString getUnreachableBytes(int index) { - return unreachable_.getByteString(index); - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param index The index to set the value at. - * @param value The unreachable to set. - * @return This builder for chaining. - */ - public Builder setUnreachable(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachable(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param values The unreachable to add. - * @return This builder for chaining. - */ - public Builder addAllUnreachable(java.lang.Iterable values) { - ensureUnreachableIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachable_); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @return This builder for chaining. - */ - public Builder clearUnreachable() { - unreachable_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Unreachable resources.
-     * 
- * - * repeated string unreachable = 3; - * - * @param value The bytes of the unreachable to add. - * @return This builder for chaining. - */ - public Builder addUnreachableBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureUnreachableIsMutable(); - unreachable_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.ListWorkflowsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.ListWorkflowsResponse) - private static final com.google.cloud.workflows.v1beta.ListWorkflowsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.ListWorkflowsResponse(); - } - - public static com.google.cloud.workflows.v1beta.ListWorkflowsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListWorkflowsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.ListWorkflowsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponseOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponseOrBuilder.java deleted file mode 100644 index d8d60a5c..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponseOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface ListWorkflowsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.ListWorkflowsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - java.util.List getWorkflowsList(); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - com.google.cloud.workflows.v1beta.Workflow getWorkflows(int index); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - int getWorkflowsCount(); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - java.util.List - getWorkflowsOrBuilderList(); - /** - * - * - *
-   * The workflows which match the request.
-   * 
- * - * repeated .google.cloud.workflows.v1beta.Workflow workflows = 1; - */ - com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowsOrBuilder(int index); - - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return A list containing the unreachable. - */ - java.util.List getUnreachableList(); - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @return The count of unreachable. - */ - int getUnreachableCount(); - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the element to return. - * @return The unreachable at the given index. - */ - java.lang.String getUnreachable(int index); - /** - * - * - *
-   * Unreachable resources.
-   * 
- * - * repeated string unreachable = 3; - * - * @param index The index of the value to return. - * @return The bytes of the unreachable at the given index. - */ - com.google.protobuf.ByteString getUnreachableBytes(int index); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/LocationName.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/LocationName.java deleted file mode 100644 index 3e7e7f8b..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/LocationName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class LocationName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - - @Deprecated - protected LocationName() { - project = null; - location = null; - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (location != null) { - fieldMapBuilder.put("location", location); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION.instantiate("project", project, "location", location); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - LocationName that = ((LocationName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/locations/{location}. */ - public static class Builder { - private String project; - private String location; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder(LocationName locationName) { - this.project = locationName.project; - this.location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadata.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadata.java deleted file mode 100644 index 6d6f99df..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadata.java +++ /dev/null @@ -1,1493 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Represents the metadata of the long-running operation.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.OperationMetadata} - */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.OperationMetadata) - OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OperationMetadata() { - target_ = ""; - verb_ = ""; - apiVersion_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.OperationMetadata.class, - com.google.cloud.workflows.v1beta.OperationMetadata.Builder.class); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 1; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int TARGET_FIELD_NUMBER = 3; - private volatile java.lang.Object target_; - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The target. - */ - @java.lang.Override - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } - } - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The bytes for target. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VERB_FIELD_NUMBER = 4; - private volatile java.lang.Object verb_; - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The verb. - */ - @java.lang.Override - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } - } - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The bytes for verb. - */ - @java.lang.Override - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int API_VERSION_FIELD_NUMBER = 5; - private volatile java.lang.Object apiVersion_; - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The apiVersion. - */ - @java.lang.Override - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } - } - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The bytes for apiVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (createTime_ != null) { - output.writeMessage(1, getCreateTime()); - } - if (endTime_ != null) { - output.writeMessage(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, apiVersion_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verb_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, verb_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(apiVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, apiVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.OperationMetadata other = - (com.google.cloud.workflows.v1beta.OperationMetadata) obj; - - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (!getTarget().equals(other.getTarget())) return false; - if (!getVerb().equals(other.getVerb())) return false; - if (!getApiVersion().equals(other.getApiVersion())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + TARGET_FIELD_NUMBER; - hash = (53 * hash) + getTarget().hashCode(); - hash = (37 * hash) + VERB_FIELD_NUMBER; - hash = (53 * hash) + getVerb().hashCode(); - hash = (37 * hash) + API_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getApiVersion().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.OperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.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.workflows.v1beta.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.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.workflows.v1beta.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.OperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.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.workflows.v1beta.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.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.workflows.v1beta.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.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.workflows.v1beta.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents the metadata of the long-running operation.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.OperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.OperationMetadata) - com.google.cloud.workflows.v1beta.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.OperationMetadata.class, - com.google.cloud.workflows.v1beta.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.OperationMetadata.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - target_ = ""; - - verb_ = ""; - - apiVersion_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.OperationMetadata build() { - com.google.cloud.workflows.v1beta.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.OperationMetadata buildPartial() { - com.google.cloud.workflows.v1beta.OperationMetadata result = - new com.google.cloud.workflows.v1beta.OperationMetadata(this); - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.target_ = target_; - result.verb_ = verb_; - result.apiVersion_ = apiVersion_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1beta.OperationMetadata) { - return mergeFrom((com.google.cloud.workflows.v1beta.OperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.OperationMetadata other) { - if (other == com.google.cloud.workflows.v1beta.OperationMetadata.getDefaultInstance()) - return this; - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (!other.getTarget().isEmpty()) { - target_ = other.target_; - onChanged(); - } - if (!other.getVerb().isEmpty()) { - verb_ = other.verb_; - onChanged(); - } - if (!other.getApiVersion().isEmpty()) { - apiVersion_ = other.apiVersion_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - target_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - verb_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - apiVersion_ = input.readStringRequireUtf8(); - - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * The time the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp endTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - endTimeBuilder_; - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } else { - return endTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - onChanged(); - } else { - endTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (endTime_ != null) { - endTime_ = - com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); - } else { - endTime_ = value; - } - onChanged(); - } else { - endTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-     * The time the operation finished running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getEndTimeFieldBuilder() { - if (endTimeBuilder_ == null) { - endTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getEndTime(), getParentForChildren(), isClean()); - endTime_ = null; - } - return endTimeBuilder_; - } - - private java.lang.Object target_ = ""; - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @return The target. - */ - public java.lang.String getTarget() { - java.lang.Object ref = target_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - target_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @return The bytes for target. - */ - public com.google.protobuf.ByteString getTargetBytes() { - java.lang.Object ref = target_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - target_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @param value The target to set. - * @return This builder for chaining. - */ - public Builder setTarget(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - target_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @return This builder for chaining. - */ - public Builder clearTarget() { - - target_ = getDefaultInstance().getTarget(); - onChanged(); - return this; - } - /** - * - * - *
-     * Server-defined resource path for the target of the operation.
-     * 
- * - * string target = 3; - * - * @param value The bytes for target to set. - * @return This builder for chaining. - */ - public Builder setTargetBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - target_ = value; - onChanged(); - return this; - } - - private java.lang.Object verb_ = ""; - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @return The verb. - */ - public java.lang.String getVerb() { - java.lang.Object ref = verb_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - verb_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @return The bytes for verb. - */ - public com.google.protobuf.ByteString getVerbBytes() { - java.lang.Object ref = verb_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - verb_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @param value The verb to set. - * @return This builder for chaining. - */ - public Builder setVerb(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - verb_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @return This builder for chaining. - */ - public Builder clearVerb() { - - verb_ = getDefaultInstance().getVerb(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the verb executed by the operation.
-     * 
- * - * string verb = 4; - * - * @param value The bytes for verb to set. - * @return This builder for chaining. - */ - public Builder setVerbBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - verb_ = value; - onChanged(); - return this; - } - - private java.lang.Object apiVersion_ = ""; - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @return The apiVersion. - */ - public java.lang.String getApiVersion() { - java.lang.Object ref = apiVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - apiVersion_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @return The bytes for apiVersion. - */ - public com.google.protobuf.ByteString getApiVersionBytes() { - java.lang.Object ref = apiVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - apiVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @param value The apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - apiVersion_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @return This builder for chaining. - */ - public Builder clearApiVersion() { - - apiVersion_ = getDefaultInstance().getApiVersion(); - onChanged(); - return this; - } - /** - * - * - *
-     * API version used to start the operation.
-     * 
- * - * string api_version = 5; - * - * @param value The bytes for apiVersion to set. - * @return This builder for chaining. - */ - public Builder setApiVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - apiVersion_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.OperationMetadata) - private static final com.google.cloud.workflows.v1beta.OperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.OperationMetadata(); - } - - public static com.google.cloud.workflows.v1beta.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 { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadataOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadataOrBuilder.java deleted file mode 100644 index b8ffa607..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface OperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * The time the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 1; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-   * The time the operation finished running.
-   * 
- * - * .google.protobuf.Timestamp end_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The target. - */ - java.lang.String getTarget(); - /** - * - * - *
-   * Server-defined resource path for the target of the operation.
-   * 
- * - * string target = 3; - * - * @return The bytes for target. - */ - com.google.protobuf.ByteString getTargetBytes(); - - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The verb. - */ - java.lang.String getVerb(); - /** - * - * - *
-   * Name of the verb executed by the operation.
-   * 
- * - * string verb = 4; - * - * @return The bytes for verb. - */ - com.google.protobuf.ByteString getVerbBytes(); - - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The apiVersion. - */ - java.lang.String getApiVersion(); - /** - * - * - *
-   * API version used to start the operation.
-   * 
- * - * string api_version = 5; - * - * @return The bytes for apiVersion. - */ - com.google.protobuf.ByteString getApiVersionBytes(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequest.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequest.java deleted file mode 100644 index 048ea3de..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequest.java +++ /dev/null @@ -1,1007 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Request for the
- * [UpdateWorkflow][google.cloud.workflows.v1beta.Workflows.UpdateWorkflow]
- * method.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.UpdateWorkflowRequest} - */ -public final class UpdateWorkflowRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.UpdateWorkflowRequest) - UpdateWorkflowRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateWorkflowRequest.newBuilder() to construct. - private UpdateWorkflowRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateWorkflowRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateWorkflowRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.class, - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.Builder.class); - } - - public static final int WORKFLOW_FIELD_NUMBER = 1; - private com.google.cloud.workflows.v1beta.Workflow workflow_; - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - @java.lang.Override - public boolean hasWorkflow() { - return workflow_ != null; - } - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow getWorkflow() { - return workflow_ == null - ? com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance() - : workflow_; - } - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder() { - return getWorkflow(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (workflow_ != null) { - output.writeMessage(1, getWorkflow()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (workflow_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getWorkflow()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.UpdateWorkflowRequest)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest other = - (com.google.cloud.workflows.v1beta.UpdateWorkflowRequest) obj; - - if (hasWorkflow() != other.hasWorkflow()) return false; - if (hasWorkflow()) { - if (!getWorkflow().equals(other.getWorkflow())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasWorkflow()) { - hash = (37 * hash) + WORKFLOW_FIELD_NUMBER; - hash = (53 * hash) + getWorkflow().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for the
-   * [UpdateWorkflow][google.cloud.workflows.v1beta.Workflows.UpdateWorkflow]
-   * method.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.UpdateWorkflowRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.UpdateWorkflowRequest) - com.google.cloud.workflows.v1beta.UpdateWorkflowRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.class, - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (workflowBuilder_ == null) { - workflow_ = null; - } else { - workflow_ = null; - workflowBuilder_ = 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.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.UpdateWorkflowRequest getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.UpdateWorkflowRequest build() { - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.UpdateWorkflowRequest buildPartial() { - com.google.cloud.workflows.v1beta.UpdateWorkflowRequest result = - new com.google.cloud.workflows.v1beta.UpdateWorkflowRequest(this); - if (workflowBuilder_ == null) { - result.workflow_ = workflow_; - } else { - result.workflow_ = workflowBuilder_.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.workflows.v1beta.UpdateWorkflowRequest) { - return mergeFrom((com.google.cloud.workflows.v1beta.UpdateWorkflowRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.UpdateWorkflowRequest other) { - if (other == com.google.cloud.workflows.v1beta.UpdateWorkflowRequest.getDefaultInstance()) - return this; - if (other.hasWorkflow()) { - mergeWorkflow(other.getWorkflow()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getWorkflowFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - case 18: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.cloud.workflows.v1beta.Workflow workflow_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder> - workflowBuilder_; - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - public boolean hasWorkflow() { - return workflowBuilder_ != null || workflow_ != null; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - public com.google.cloud.workflows.v1beta.Workflow getWorkflow() { - if (workflowBuilder_ == null) { - return workflow_ == null - ? com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance() - : workflow_; - } else { - return workflowBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - workflow_ = value; - onChanged(); - } else { - workflowBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setWorkflow(com.google.cloud.workflows.v1beta.Workflow.Builder builderForValue) { - if (workflowBuilder_ == null) { - workflow_ = builderForValue.build(); - onChanged(); - } else { - workflowBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeWorkflow(com.google.cloud.workflows.v1beta.Workflow value) { - if (workflowBuilder_ == null) { - if (workflow_ != null) { - workflow_ = - com.google.cloud.workflows.v1beta.Workflow.newBuilder(workflow_) - .mergeFrom(value) - .buildPartial(); - } else { - workflow_ = value; - } - onChanged(); - } else { - workflowBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearWorkflow() { - if (workflowBuilder_ == null) { - workflow_ = null; - onChanged(); - } else { - workflow_ = null; - workflowBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1beta.Workflow.Builder getWorkflowBuilder() { - - onChanged(); - return getWorkflowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder() { - if (workflowBuilder_ != null) { - return workflowBuilder_.getMessageOrBuilder(); - } else { - return workflow_ == null - ? com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance() - : workflow_; - } - } - /** - * - * - *
-     * Required. Workflow to be updated.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder> - getWorkflowFieldBuilder() { - if (workflowBuilder_ == null) { - workflowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.workflows.v1beta.Workflow, - com.google.cloud.workflows.v1beta.Workflow.Builder, - com.google.cloud.workflows.v1beta.WorkflowOrBuilder>( - getWorkflow(), getParentForChildren(), isClean()); - workflow_ = null; - } - return workflowBuilder_; - } - - 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_; - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * List of fields to be updated. If not present, the entire workflow
-     * will be updated.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.workflows.v1beta.UpdateWorkflowRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.UpdateWorkflowRequest) - private static final com.google.cloud.workflows.v1beta.UpdateWorkflowRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.UpdateWorkflowRequest(); - } - - public static com.google.cloud.workflows.v1beta.UpdateWorkflowRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateWorkflowRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.UpdateWorkflowRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequestOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequestOrBuilder.java deleted file mode 100644 index b5ae3fec..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequestOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface UpdateWorkflowRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.UpdateWorkflowRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the workflow field is set. - */ - boolean hasWorkflow(); - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The workflow. - */ - com.google.cloud.workflows.v1beta.Workflow getWorkflow(); - /** - * - * - *
-   * Required. Workflow to be updated.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow workflow = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.workflows.v1beta.WorkflowOrBuilder getWorkflowOrBuilder(); - - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * List of fields to be updated. If not present, the entire workflow
-   * will be updated.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/Workflow.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/Workflow.java deleted file mode 100644 index 7c6b75b7..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/Workflow.java +++ /dev/null @@ -1,3123 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -/** - * - * - *
- * Workflow program to be executed by Workflows.
- * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.Workflow} - */ -public final class Workflow extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.workflows.v1beta.Workflow) - WorkflowOrBuilder { - private static final long serialVersionUID = 0L; - // Use Workflow.newBuilder() to construct. - private Workflow(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Workflow() { - name_ = ""; - description_ = ""; - state_ = 0; - revisionId_ = ""; - serviceAccount_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Workflow(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_Workflow_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_Workflow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.Workflow.class, - com.google.cloud.workflows.v1beta.Workflow.Builder.class); - } - - /** - * - * - *
-   * Describes the current state of workflow deployment. More states may be
-   * added in the future.
-   * 
- * - * Protobuf enum {@code google.cloud.workflows.v1beta.Workflow.State} - */ - public enum State implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Invalid state.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - STATE_UNSPECIFIED(0), - /** - * - * - *
-     * The workflow has been deployed successfully and is serving.
-     * 
- * - * ACTIVE = 1; - */ - ACTIVE(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Invalid state.
-     * 
- * - * STATE_UNSPECIFIED = 0; - */ - public static final int STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * The workflow has been deployed successfully and is serving.
-     * 
- * - * ACTIVE = 1; - */ - public static final int ACTIVE_VALUE = 1; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static State valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static State forNumber(int value) { - switch (value) { - case 0: - return STATE_UNSPECIFIED; - case 1: - return ACTIVE; - 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.workflows.v1beta.Workflow.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.workflows.v1beta.Workflow.State) - } - - private int sourceCodeCase_ = 0; - private java.lang.Object sourceCode_; - - public enum SourceCodeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - SOURCE_CONTENTS(10), - SOURCECODE_NOT_SET(0); - private final int value; - - private SourceCodeCase(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 SourceCodeCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCodeCase forNumber(int value) { - switch (value) { - case 10: - return SOURCE_CONTENTS; - case 0: - return SOURCECODE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public SourceCodeCase getSourceCodeCase() { - return SourceCodeCase.forNumber(sourceCodeCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * The resource name of the workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * 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 workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * 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 DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 3; - private int state_; - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.workflows.v1beta.Workflow.State result = - com.google.cloud.workflows.v1beta.Workflow.State.valueOf(state_); - return result == null ? com.google.cloud.workflows.v1beta.Workflow.State.UNRECOGNIZED : result; - } - - public static final int REVISION_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object revisionId_; - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following fields of a workflow:
-   * - `source_code`
-   * - `service_account`
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The revisionId. - */ - @java.lang.Override - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following fields of a workflow:
-   * - `source_code`
-   * - `service_account`
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for revisionId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - revisionId_ = 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 last update timestamp of the workflow.
-   * 
- * - * .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 last update timestamp of the workflow.
-   * 
- * - * .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 last update timestamp of the workflow.
-   * 
- * - * .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 REVISION_CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp revisionCreateTime_; - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the revisionCreateTime field is set. - */ - @java.lang.Override - public boolean hasRevisionCreateTime() { - return revisionCreateTime_ != null; - } - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The revisionCreateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getRevisionCreateTime() { - return revisionCreateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : revisionCreateTime_; - } - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - return getRevisionCreateTime(); - } - - public static final int LABELS_FIELD_NUMBER = 8; - - private static final class LabelsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_Workflow_LabelsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int SERVICE_ACCOUNT_FIELD_NUMBER = 9; - private volatile java.lang.Object serviceAccount_; - /** - * - * - *
-   * Name of the service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account}
-   * Using `-` as a wildcard for the `{project}` will infer the project from
-   * the account. The `{account}` value can be the `email` address or the
-   * `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @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; - } - } - /** - * - * - *
-   * Name of the service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account}
-   * Using `-` as a wildcard for the `{project}` will infer the project from
-   * the account. The `{account}` value can be the `email` address or the
-   * `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @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 SOURCE_CONTENTS_FIELD_NUMBER = 10; - /** - * - * - *
-   * Workflow code to be executed. The size limit is 32KB.
-   * 
- * - * string source_contents = 10; - * - * @return Whether the sourceContents field is set. - */ - public boolean hasSourceContents() { - return sourceCodeCase_ == 10; - } - /** - * - * - *
-   * Workflow code to be executed. The size limit is 32KB.
-   * 
- * - * string source_contents = 10; - * - * @return The sourceContents. - */ - public java.lang.String getSourceContents() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (ref instanceof java.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 (sourceCodeCase_ == 10) { - sourceCode_ = s; - } - return s; - } - } - /** - * - * - *
-   * Workflow code to be executed. The size limit is 32KB.
-   * 
- * - * string source_contents = 10; - * - * @return The bytes for sourceContents. - */ - public com.google.protobuf.ByteString getSourceContentsBytes() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (sourceCodeCase_ == 10) { - sourceCode_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (state_ != com.google.cloud.workflows.v1beta.Workflow.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, revisionId_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(6, getUpdateTime()); - } - if (revisionCreateTime_ != null) { - output.writeMessage(7, getRevisionCreateTime()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceAccount_); - } - if (sourceCodeCase_ == 10) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 10, sourceCode_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (state_ != com.google.cloud.workflows.v1beta.Workflow.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(revisionId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, revisionId_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); - } - if (revisionCreateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getRevisionCreateTime()); - } - for (java.util.Map.Entry entry : - internalGetLabels().getMap().entrySet()) { - com.google.protobuf.MapEntry labels__ = - LabelsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceAccount_); - } - if (sourceCodeCase_ == 10) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, sourceCode_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.workflows.v1beta.Workflow)) { - return super.equals(obj); - } - com.google.cloud.workflows.v1beta.Workflow other = - (com.google.cloud.workflows.v1beta.Workflow) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (state_ != other.state_) return false; - if (!getRevisionId().equals(other.getRevisionId())) 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 (hasRevisionCreateTime() != other.hasRevisionCreateTime()) return false; - if (hasRevisionCreateTime()) { - if (!getRevisionCreateTime().equals(other.getRevisionCreateTime())) return false; - } - if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!getServiceAccount().equals(other.getServiceAccount())) return false; - if (!getSourceCodeCase().equals(other.getSourceCodeCase())) return false; - switch (sourceCodeCase_) { - case 10: - if (!getSourceContents().equals(other.getSourceContents())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + REVISION_ID_FIELD_NUMBER; - hash = (53 * hash) + getRevisionId().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - if (hasRevisionCreateTime()) { - hash = (37 * hash) + REVISION_CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getRevisionCreateTime().hashCode(); - } - if (!internalGetLabels().getMap().isEmpty()) { - hash = (37 * hash) + LABELS_FIELD_NUMBER; - hash = (53 * hash) + internalGetLabels().hashCode(); - } - hash = (37 * hash) + SERVICE_ACCOUNT_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccount().hashCode(); - switch (sourceCodeCase_) { - case 10: - hash = (37 * hash) + SOURCE_CONTENTS_FIELD_NUMBER; - hash = (53 * hash) + getSourceContents().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.workflows.v1beta.Workflow parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.workflows.v1beta.Workflow prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Workflow program to be executed by Workflows.
-   * 
- * - * Protobuf type {@code google.cloud.workflows.v1beta.Workflow} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.workflows.v1beta.Workflow) - com.google.cloud.workflows.v1beta.WorkflowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_Workflow_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 8: - return internalGetLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 8: - return internalGetMutableLabels(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_Workflow_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.workflows.v1beta.Workflow.class, - com.google.cloud.workflows.v1beta.Workflow.Builder.class); - } - - // Construct using com.google.cloud.workflows.v1beta.Workflow.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - state_ = 0; - - revisionId_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - internalGetMutableLabels().clear(); - serviceAccount_ = ""; - - sourceCodeCase_ = 0; - sourceCode_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.workflows.v1beta.WorkflowsProto - .internal_static_google_cloud_workflows_v1beta_Workflow_descriptor; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow getDefaultInstanceForType() { - return com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow build() { - com.google.cloud.workflows.v1beta.Workflow result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow buildPartial() { - com.google.cloud.workflows.v1beta.Workflow result = - new com.google.cloud.workflows.v1beta.Workflow(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.state_ = state_; - result.revisionId_ = revisionId_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - if (revisionCreateTimeBuilder_ == null) { - result.revisionCreateTime_ = revisionCreateTime_; - } else { - result.revisionCreateTime_ = revisionCreateTimeBuilder_.build(); - } - result.labels_ = internalGetLabels(); - result.labels_.makeImmutable(); - result.serviceAccount_ = serviceAccount_; - if (sourceCodeCase_ == 10) { - result.sourceCode_ = sourceCode_; - } - result.sourceCodeCase_ = sourceCodeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.workflows.v1beta.Workflow) { - return mergeFrom((com.google.cloud.workflows.v1beta.Workflow) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.workflows.v1beta.Workflow other) { - if (other == com.google.cloud.workflows.v1beta.Workflow.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getRevisionId().isEmpty()) { - revisionId_ = other.revisionId_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.hasRevisionCreateTime()) { - mergeRevisionCreateTime(other.getRevisionCreateTime()); - } - internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - if (!other.getServiceAccount().isEmpty()) { - serviceAccount_ = other.serviceAccount_; - onChanged(); - } - switch (other.getSourceCodeCase()) { - case SOURCE_CONTENTS: - { - sourceCodeCase_ = 10; - sourceCode_ = other.sourceCode_; - onChanged(); - break; - } - case SOURCECODE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 24: - { - state_ = input.readEnum(); - - break; - } // case 24 - case 34: - { - revisionId_ = input.readStringRequireUtf8(); - - break; - } // case 34 - case 42: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - case 50: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 50 - case 58: - { - input.readMessage( - getRevisionCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 58 - case 66: - { - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableLabels() - .getMutableMap() - .put(labels__.getKey(), labels__.getValue()); - break; - } // case 66 - case 74: - { - serviceAccount_ = input.readStringRequireUtf8(); - - break; - } // case 74 - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - sourceCodeCase_ = 10; - sourceCode_ = s; - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int sourceCodeCase_ = 0; - private java.lang.Object sourceCode_; - - public SourceCodeCase getSourceCodeCase() { - return SourceCodeCase.forNumber(sourceCodeCase_); - } - - public Builder clearSourceCode() { - sourceCodeCase_ = 0; - sourceCode_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * The resource name of the workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource name of the workflow.
-     * Format: projects/{project}/locations/{location}/workflows/{workflow}
-     * 
- * - * 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 java.lang.Object description_ = ""; - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Description of the workflow provided by the user.
-     * Must be at most 1000 unicode characters long.
-     * 
- * - * string description = 2; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private int state_ = 0; - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. - */ - public Builder setStateValue(int value) { - - state_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow.State getState() { - @SuppressWarnings("deprecation") - com.google.cloud.workflows.v1beta.Workflow.State result = - com.google.cloud.workflows.v1beta.Workflow.State.valueOf(state_); - return result == null - ? com.google.cloud.workflows.v1beta.Workflow.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(com.google.cloud.workflows.v1beta.Workflow.State value) { - if (value == null) { - throw new NullPointerException(); - } - - state_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. State of the workflow deployment.
-     * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearState() { - - state_ = 0; - onChanged(); - return this; - } - - private java.lang.Object revisionId_ = ""; - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following fields of a workflow:
-     * - `source_code`
-     * - `service_account`
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The revisionId. - */ - public java.lang.String getRevisionId() { - java.lang.Object ref = revisionId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - revisionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following fields of a workflow:
-     * - `source_code`
-     * - `service_account`
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for revisionId. - */ - public com.google.protobuf.ByteString getRevisionIdBytes() { - java.lang.Object ref = revisionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - revisionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following fields of a workflow:
-     * - `source_code`
-     * - `service_account`
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - revisionId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following fields of a workflow:
-     * - `source_code`
-     * - `service_account`
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearRevisionId() { - - revisionId_ = getDefaultInstance().getRevisionId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The revision of the workflow.
-     * A new revision of a workflow is created as a result of updating the
-     * following fields of a workflow:
-     * - `source_code`
-     * - `service_account`
-     * The format is "000001-a4d", where the first 6 characters define
-     * the zero-padded revision ordinal number. They are followed by a hyphen and
-     * 3 hexadecimal random characters.
-     * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for revisionId to set. - * @return This builder for chaining. - */ - public Builder setRevisionIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - revisionId_ = 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow 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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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 last update timestamp of the workflow.
-     * 
- * - * - * .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.Timestamp revisionCreateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - revisionCreateTimeBuilder_; - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the revisionCreateTime field is set. - */ - public boolean hasRevisionCreateTime() { - return revisionCreateTimeBuilder_ != null || revisionCreateTime_ != null; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The revisionCreateTime. - */ - public com.google.protobuf.Timestamp getRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - return revisionCreateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : revisionCreateTime_; - } else { - return revisionCreateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - revisionCreateTime_ = value; - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setRevisionCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = builderForValue.build(); - onChanged(); - } else { - revisionCreateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeRevisionCreateTime(com.google.protobuf.Timestamp value) { - if (revisionCreateTimeBuilder_ == null) { - if (revisionCreateTime_ != null) { - revisionCreateTime_ = - com.google.protobuf.Timestamp.newBuilder(revisionCreateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - revisionCreateTime_ = value; - } - onChanged(); - } else { - revisionCreateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearRevisionCreateTime() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTime_ = null; - onChanged(); - } else { - revisionCreateTime_ = null; - revisionCreateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getRevisionCreateTimeBuilder() { - - onChanged(); - return getRevisionCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder() { - if (revisionCreateTimeBuilder_ != null) { - return revisionCreateTimeBuilder_.getMessageOrBuilder(); - } else { - return revisionCreateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : revisionCreateTime_; - } - } - /** - * - * - *
-     * Output only. The timestamp that the latest revision of the workflow
-     * was created.
-     * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getRevisionCreateTimeFieldBuilder() { - if (revisionCreateTimeBuilder_ == null) { - revisionCreateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getRevisionCreateTime(), getParentForChildren(), isClean()); - revisionCreateTime_ = null; - } - return revisionCreateTimeBuilder_; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged(); - ; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); - } - return labels_; - } - - public int getLabelsCount() { - return internalGetLabels().getMap().size(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetLabels().getMap().containsKey(key); - } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableLabels().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Labels associated with this workflow.
-     * Labels can contain at most 64 entries. Keys and values can be no longer
-     * than 63 characters and can only contain lowercase letters, numeric
-     * characters, underscores and dashes. Label keys must start with a letter.
-     * International characters are allowed.
-     * 
- * - * map<string, string> labels = 8; - */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); - return this; - } - - private java.lang.Object serviceAccount_ = ""; - /** - * - * - *
-     * Name of the service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account}
-     * Using `-` as a wildcard for the `{project}` will infer the project from
-     * the account. The `{account}` value can be the `email` address or the
-     * `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - } - /** - * - * - *
-     * Name of the service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account}
-     * Using `-` as a wildcard for the `{project}` will infer the project from
-     * the account. The `{account}` value can be the `email` address or the
-     * `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - } - /** - * - * - *
-     * Name of the service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account}
-     * Using `-` as a wildcard for the `{project}` will infer the project from
-     * the account. The `{account}` value can be the `email` address or the
-     * `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - /** - * - * - *
-     * Name of the service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account}
-     * Using `-` as a wildcard for the `{project}` will infer the project from
-     * the account. The `{account}` value can be the `email` address or the
-     * `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccount() { - - serviceAccount_ = getDefaultInstance().getServiceAccount(); - onChanged(); - return this; - } - /** - * - * - *
-     * Name of the service account associated with the latest workflow version.
-     * This service account represents the identity of the workflow and determines
-     * what permissions the workflow has.
-     * Format: projects/{project}/serviceAccounts/{account}
-     * Using `-` as a wildcard for the `{project}` will infer the project from
-     * the account. The `{account}` value can be the `email` address or the
-     * `unique_id` of the service account.
-     * If not provided, workflow will use the project's default service account.
-     * Modifying this field for an existing workflow results in a new workflow
-     * revision.
-     * 
- * - * string service_account = 9; - * - * @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; - } - - /** - * - * - *
-     * Workflow code to be executed. The size limit is 32KB.
-     * 
- * - * string source_contents = 10; - * - * @return Whether the sourceContents field is set. - */ - @java.lang.Override - public boolean hasSourceContents() { - return sourceCodeCase_ == 10; - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 32KB.
-     * 
- * - * string source_contents = 10; - * - * @return The sourceContents. - */ - @java.lang.Override - public java.lang.String getSourceContents() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (sourceCodeCase_ == 10) { - sourceCode_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 32KB.
-     * 
- * - * string source_contents = 10; - * - * @return The bytes for sourceContents. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSourceContentsBytes() { - java.lang.Object ref = ""; - if (sourceCodeCase_ == 10) { - ref = sourceCode_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (sourceCodeCase_ == 10) { - sourceCode_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 32KB.
-     * 
- * - * string source_contents = 10; - * - * @param value The sourceContents to set. - * @return This builder for chaining. - */ - public Builder setSourceContents(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - sourceCodeCase_ = 10; - sourceCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 32KB.
-     * 
- * - * string source_contents = 10; - * - * @return This builder for chaining. - */ - public Builder clearSourceContents() { - if (sourceCodeCase_ == 10) { - sourceCodeCase_ = 0; - sourceCode_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Workflow code to be executed. The size limit is 32KB.
-     * 
- * - * string source_contents = 10; - * - * @param value The bytes for sourceContents to set. - * @return This builder for chaining. - */ - public Builder setSourceContentsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - sourceCodeCase_ = 10; - sourceCode_ = 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.workflows.v1beta.Workflow) - } - - // @@protoc_insertion_point(class_scope:google.cloud.workflows.v1beta.Workflow) - private static final com.google.cloud.workflows.v1beta.Workflow DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.workflows.v1beta.Workflow(); - } - - public static com.google.cloud.workflows.v1beta.Workflow getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Workflow parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.workflows.v1beta.Workflow getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowName.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowName.java deleted file mode 100644 index 72fa5aa0..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowName.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta; - -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 WorkflowName implements ResourceName { - private static final PathTemplate PROJECT_LOCATION_WORKFLOW = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/workflows/{workflow}"); - private volatile Map fieldValuesMap; - private final String project; - private final String location; - private final String workflow; - - @Deprecated - protected WorkflowName() { - project = null; - location = null; - workflow = null; - } - - private WorkflowName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - workflow = Preconditions.checkNotNull(builder.getWorkflow()); - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getWorkflow() { - return workflow; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static WorkflowName of(String project, String location, String workflow) { - return newBuilder().setProject(project).setLocation(location).setWorkflow(workflow).build(); - } - - public static String format(String project, String location, String workflow) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setWorkflow(workflow) - .build() - .toString(); - } - - public static WorkflowName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_LOCATION_WORKFLOW.validatedMatch( - formattedString, "WorkflowName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("workflow")); - } - - 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 (WorkflowName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_LOCATION_WORKFLOW.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 (workflow != null) { - fieldMapBuilder.put("workflow", workflow); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_LOCATION_WORKFLOW.instantiate( - "project", project, "location", location, "workflow", workflow); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - WorkflowName that = ((WorkflowName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.location, that.location) - && Objects.equals(this.workflow, that.workflow); - } - 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(workflow); - return h; - } - - /** Builder for projects/{project}/locations/{location}/workflows/{workflow}. */ - public static class Builder { - private String project; - private String location; - private String workflow; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getWorkflow() { - return workflow; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setWorkflow(String workflow) { - this.workflow = workflow; - return this; - } - - private Builder(WorkflowName workflowName) { - this.project = workflowName.project; - this.location = workflowName.location; - this.workflow = workflowName.workflow; - } - - public WorkflowName build() { - return new WorkflowName(this); - } - } -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowOrBuilder.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowOrBuilder.java deleted file mode 100644 index 9ae9b9c0..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowOrBuilder.java +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public interface WorkflowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.workflows.v1beta.Workflow) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name of the workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * The resource name of the workflow.
-   * Format: projects/{project}/locations/{location}/workflows/{workflow}
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Description of the workflow provided by the user.
-   * Must be at most 1000 unicode characters long.
-   * 
- * - * string description = 2; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for state. - */ - int getStateValue(); - /** - * - * - *
-   * Output only. State of the workflow deployment.
-   * 
- * - * - * .google.cloud.workflows.v1beta.Workflow.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The state. - */ - com.google.cloud.workflows.v1beta.Workflow.State getState(); - - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following fields of a workflow:
-   * - `source_code`
-   * - `service_account`
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The revisionId. - */ - java.lang.String getRevisionId(); - /** - * - * - *
-   * Output only. The revision of the workflow.
-   * A new revision of a workflow is created as a result of updating the
-   * following fields of a workflow:
-   * - `source_code`
-   * - `service_account`
-   * The format is "000001-a4d", where the first 6 characters define
-   * the zero-padded revision ordinal number. They are followed by a hyphen and
-   * 3 hexadecimal random characters.
-   * 
- * - * string revision_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for revisionId. - */ - com.google.protobuf.ByteString getRevisionIdBytes(); - - /** - * - * - *
-   * Output only. The timestamp of when the workflow 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 timestamp of when the workflow 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 timestamp of when the workflow was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The last update timestamp of the workflow.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The last update timestamp of the workflow.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The last update timestamp of the workflow.
-   * 
- * - * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the revisionCreateTime field is set. - */ - boolean hasRevisionCreateTime(); - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The revisionCreateTime. - */ - com.google.protobuf.Timestamp getRevisionCreateTime(); - /** - * - * - *
-   * Output only. The timestamp that the latest revision of the workflow
-   * was created.
-   * 
- * - * - * .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getRevisionCreateTimeOrBuilder(); - - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - int getLabelsCount(); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - boolean containsLabels(java.lang.String key); - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getLabels(); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - java.util.Map getLabelsMap(); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - - /* nullable */ - java.lang.String getLabelsOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * Labels associated with this workflow.
-   * Labels can contain at most 64 entries. Keys and values can be no longer
-   * than 63 characters and can only contain lowercase letters, numeric
-   * characters, underscores and dashes. Label keys must start with a letter.
-   * International characters are allowed.
-   * 
- * - * map<string, string> labels = 8; - */ - java.lang.String getLabelsOrThrow(java.lang.String key); - - /** - * - * - *
-   * Name of the service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account}
-   * Using `-` as a wildcard for the `{project}` will infer the project from
-   * the account. The `{account}` value can be the `email` address or the
-   * `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @return The serviceAccount. - */ - java.lang.String getServiceAccount(); - /** - * - * - *
-   * Name of the service account associated with the latest workflow version.
-   * This service account represents the identity of the workflow and determines
-   * what permissions the workflow has.
-   * Format: projects/{project}/serviceAccounts/{account}
-   * Using `-` as a wildcard for the `{project}` will infer the project from
-   * the account. The `{account}` value can be the `email` address or the
-   * `unique_id` of the service account.
-   * If not provided, workflow will use the project's default service account.
-   * Modifying this field for an existing workflow results in a new workflow
-   * revision.
-   * 
- * - * string service_account = 9; - * - * @return The bytes for serviceAccount. - */ - com.google.protobuf.ByteString getServiceAccountBytes(); - - /** - * - * - *
-   * Workflow code to be executed. The size limit is 32KB.
-   * 
- * - * string source_contents = 10; - * - * @return Whether the sourceContents field is set. - */ - boolean hasSourceContents(); - /** - * - * - *
-   * Workflow code to be executed. The size limit is 32KB.
-   * 
- * - * string source_contents = 10; - * - * @return The sourceContents. - */ - java.lang.String getSourceContents(); - /** - * - * - *
-   * Workflow code to be executed. The size limit is 32KB.
-   * 
- * - * string source_contents = 10; - * - * @return The bytes for sourceContents. - */ - com.google.protobuf.ByteString getSourceContentsBytes(); - - public com.google.cloud.workflows.v1beta.Workflow.SourceCodeCase getSourceCodeCase(); -} diff --git a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsProto.java b/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsProto.java deleted file mode 100644 index 0e43d1c2..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsProto.java +++ /dev/null @@ -1,271 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/workflows/v1beta/workflows.proto - -package com.google.cloud.workflows.v1beta; - -public final class WorkflowsProto { - private WorkflowsProto() {} - - 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_workflows_v1beta_Workflow_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_Workflow_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_Workflow_LabelsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_Workflow_LabelsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_workflows_v1beta_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_workflows_v1beta_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/workflows/v1beta/workflow" - + "s.proto\022\035google.cloud.workflows.v1beta\032\034" - + "google/api/annotations.proto\032\027google/api" - + "/client.proto\032\037google/api/field_behavior" - + ".proto\032\031google/api/resource.proto\032#googl" - + "e/longrunning/operations.proto\032 google/p" - + "rotobuf/field_mask.proto\032\037google/protobu" - + "f/timestamp.proto\"\376\004\n\010Workflow\022\014\n\004name\030\001" - + " \001(\t\022\023\n\013description\030\002 \001(\t\022A\n\005state\030\003 \001(\016" - + "2-.google.cloud.workflows.v1beta.Workflo" - + "w.StateB\003\340A\003\022\030\n\013revision_id\030\004 \001(\tB\003\340A\003\0224" - + "\n\013create_time\030\005 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\0224\n\013update_time\030\006 \001(\0132\032.goog" - + "le.protobuf.TimestampB\003\340A\003\022=\n\024revision_c" - + "reate_time\030\007 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\022C\n\006labels\030\010 \003(\01323.google.cloud" - + ".workflows.v1beta.Workflow.LabelsEntry\022\027" - + "\n\017service_account\030\t \001(\t\022\031\n\017source_conten" - + "ts\030\n \001(\tH\000\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_UNSP" - + "ECIFIED\020\000\022\n\n\006ACTIVE\020\001:d\352Aa\n!workflows.go" - + "ogleapis.com/Workflow\022\n\010workf" - + "low\030\002 \001(\0132\'.google.cloud.workflows.v1bet" - + "a.WorkflowB\003\340A\002\022\030\n\013workflow_id\030\003 \001(\tB\003\340A" - + "\002\"P\n\025DeleteWorkflowRequest\0227\n\004name\030\001 \001(\t" - + "B)\340A\002\372A#\n!workflows.googleapis.com/Workf" - + "low\"\210\001\n\025UpdateWorkflowRequest\022>\n\010workflo" - + "w\030\001 \001(\0132\'.google.cloud.workflows.v1beta." - + "WorkflowB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\"\245\001\n\021OperationMeta" - + "data\022/\n\013create_time\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.google" - + ".protobuf.Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004v" - + "erb\030\004 \001(\t\022\023\n\013api_version\030\005 \001(\t2\371\010\n\tWorkf" - + "lows\022\276\001\n\rListWorkflows\0223.google.cloud.wo" - + "rkflows.v1beta.ListWorkflowsRequest\0324.go" - + "ogle.cloud.workflows.v1beta.ListWorkflow" - + "sResponse\"B\202\323\344\223\0023\0221/v1beta/{parent=proje" - + "cts/*/locations/*}/workflows\332A\006parent\022\253\001" - + "\n\013GetWorkflow\0221.google.cloud.workflows.v" - + "1beta.GetWorkflowRequest\032\'.google.cloud." - + "workflows.v1beta.Workflow\"@\202\323\344\223\0023\0221/v1be" - + "ta/{name=projects/*/locations/*/workflow" - + "s/*}\332A\004name\022\351\001\n\016CreateWorkflow\0224.google." - + "cloud.workflows.v1beta.CreateWorkflowReq" - + "uest\032\035.google.longrunning.Operation\"\201\001\202\323" - + "\344\223\002=\"1/v1beta/{parent=projects/*/locatio" - + "ns/*}/workflows:\010workflow\332A\033parent,workf" - + "low,workflow_id\312A\035\n\010Workflow\022\021OperationM" - + "etadata\022\324\001\n\016DeleteWorkflow\0224.google.clou" - + "d.workflows.v1beta.DeleteWorkflowRequest" - + "\032\035.google.longrunning.Operation\"m\202\323\344\223\0023*" - + "1/v1beta/{name=projects/*/locations/*/wo" - + "rkflows/*}\332A\004name\312A*\n\025google.protobuf.Em" - + "pty\022\021OperationMetadata\022\353\001\n\016UpdateWorkflo" - + "w\0224.google.cloud.workflows.v1beta.Update" - + "WorkflowRequest\032\035.google.longrunning.Ope" - + "ration\"\203\001\202\323\344\223\002F2:/v1beta/{workflow.name=" - + "projects/*/locations/*/workflows/*}:\010wor" - + "kflow\332A\024workflow,update_mask\312A\035\n\010Workflo" - + "w\022\021OperationMetadata\032L\312A\030workflows.googl" - + "eapis.com\322A.https://www.googleapis.com/a" - + "uth/cloud-platformB}\n!com.google.cloud.w" - + "orkflows.v1betaB\016WorkflowsProtoP\001ZFgoogl" - + "e.golang.org/genproto/googleapis/cloud/w" - + "orkflows/v1beta;workflowsb\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_workflows_v1beta_Workflow_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_workflows_v1beta_Workflow_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_Workflow_descriptor, - new java.lang.String[] { - "Name", - "Description", - "State", - "RevisionId", - "CreateTime", - "UpdateTime", - "RevisionCreateTime", - "Labels", - "ServiceAccount", - "SourceContents", - "SourceCode", - }); - internal_static_google_cloud_workflows_v1beta_Workflow_LabelsEntry_descriptor = - internal_static_google_cloud_workflows_v1beta_Workflow_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_workflows_v1beta_Workflow_LabelsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_Workflow_LabelsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_ListWorkflowsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", "Filter", "OrderBy", - }); - internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_ListWorkflowsResponse_descriptor, - new java.lang.String[] { - "Workflows", "NextPageToken", "Unreachable", - }); - internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_GetWorkflowRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_CreateWorkflowRequest_descriptor, - new java.lang.String[] { - "Parent", "Workflow", "WorkflowId", - }); - internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_DeleteWorkflowRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_UpdateWorkflowRequest_descriptor, - new java.lang.String[] { - "Workflow", "UpdateMask", - }); - internal_static_google_cloud_workflows_v1beta_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_workflows_v1beta_OperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_workflows_v1beta_OperationMetadata_descriptor, - new java.lang.String[] { - "CreateTime", "EndTime", "Target", "Verb", "ApiVersion", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resource); - registry.add(com.google.api.ResourceProto.resourceReference); - registry.add(com.google.longrunning.OperationsProto.operationInfo); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.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-workflows-v1beta/src/main/proto/google/cloud/workflows/v1beta/workflows.proto b/proto-google-cloud-workflows-v1beta/src/main/proto/google/cloud/workflows/v1beta/workflows.proto deleted file mode 100644 index 5308fa73..00000000 --- a/proto-google-cloud-workflows-v1beta/src/main/proto/google/cloud/workflows/v1beta/workflows.proto +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// 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.workflows.v1beta; - -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/workflows/v1beta;workflows"; -option java_multiple_files = true; -option java_outer_classname = "WorkflowsProto"; -option java_package = "com.google.cloud.workflows.v1beta"; - -// Workflows is used to deploy and execute workflow programs. -// Workflows makes sure the program executes reliably, despite hardware and -// networking interruptions. -service Workflows { - option (google.api.default_host) = "workflows.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Lists Workflows in a given project and location. - // The default order is not specified. - rpc ListWorkflows(ListWorkflowsRequest) returns (ListWorkflowsResponse) { - option (google.api.http) = { - get: "/v1beta/{parent=projects/*/locations/*}/workflows" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets details of a single Workflow. - rpc GetWorkflow(GetWorkflowRequest) returns (Workflow) { - option (google.api.http) = { - get: "/v1beta/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new workflow. If a workflow with the specified name already - // exists in the specified project and location, the long running operation - // will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - rpc CreateWorkflow(CreateWorkflowRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta/{parent=projects/*/locations/*}/workflows" - body: "workflow" - }; - option (google.api.method_signature) = "parent,workflow,workflow_id"; - option (google.longrunning.operation_info) = { - response_type: "Workflow" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a workflow with the specified name. - // This method also cancels and deletes all running executions of the - // workflow. - rpc DeleteWorkflow(DeleteWorkflowRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Updates an existing workflow. - // Running this method has no impact on already running executions of the - // workflow. A new revision of the workflow may be created as a result of a - // successful update operation. In that case, such revision will be used - // in new workflow executions. - rpc UpdateWorkflow(UpdateWorkflowRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta/{workflow.name=projects/*/locations/*/workflows/*}" - body: "workflow" - }; - option (google.api.method_signature) = "workflow,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Workflow" - metadata_type: "OperationMetadata" - }; - } -} - -// Workflow program to be executed by Workflows. -message Workflow { - option (google.api.resource) = { - type: "workflows.googleapis.com/Workflow" - pattern: "projects/{project}/locations/{location}/workflows/{workflow}" - }; - - // Describes the current state of workflow deployment. More states may be - // added in the future. - enum State { - // Invalid state. - STATE_UNSPECIFIED = 0; - - // The workflow has been deployed successfully and is serving. - ACTIVE = 1; - } - - // The resource name of the workflow. - // Format: projects/{project}/locations/{location}/workflows/{workflow} - string name = 1; - - // Description of the workflow provided by the user. - // Must be at most 1000 unicode characters long. - string description = 2; - - // Output only. State of the workflow deployment. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The revision of the workflow. - // A new revision of a workflow is created as a result of updating the - // following fields of a workflow: - // - `source_code` - // - `service_account` - // The format is "000001-a4d", where the first 6 characters define - // the zero-padded revision ordinal number. They are followed by a hyphen and - // 3 hexadecimal random characters. - string revision_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The timestamp of when the workflow was created. - google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last update timestamp of the workflow. - google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The timestamp that the latest revision of the workflow - // was created. - google.protobuf.Timestamp revision_create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Labels associated with this workflow. - // Labels can contain at most 64 entries. Keys and values can be no longer - // than 63 characters and can only contain lowercase letters, numeric - // characters, underscores and dashes. Label keys must start with a letter. - // International characters are allowed. - map labels = 8; - - // Name of the service account associated with the latest workflow version. - // This service account represents the identity of the workflow and determines - // what permissions the workflow has. - // Format: projects/{project}/serviceAccounts/{account} - // - // Using `-` as a wildcard for the `{project}` will infer the project from - // the account. The `{account}` value can be the `email` address or the - // `unique_id` of the service account. - // - // If not provided, workflow will use the project's default service account. - // Modifying this field for an existing workflow results in a new workflow - // revision. - string service_account = 9; - - // Required. Location of the workflow source code. - // Modifying this field for an existing workflow results in a new workflow - // revision. - oneof source_code { - // Workflow code to be executed. The size limit is 32KB. - string source_contents = 10; - } -} - -// Request for the -// [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows] -// method. -message ListWorkflowsRequest { - // Required. Project and location from which the workflows should be listed. - // Format: projects/{project}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Maximum number of workflows to return per call. The service may return - // fewer than this value. If the value is not specified, a default value of - // 500 will be used. The maximum permitted value is 1000 and values greater - // than 1000 will be coerced down to 1000. - int32 page_size = 2; - - // A page token, received from a previous `ListWorkflows` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListWorkflows` must - // match the call that provided the page token. - string page_token = 3; - - // Filter to restrict results to specific workflows. - string filter = 4; - - // Comma-separated list of fields that that specify the order of the results. - // Default sorting order for a field is ascending. To specify descending order - // for a field, append a " desc" suffix. - // If not specified, the results will be returned in an unspecified order. - string order_by = 5; -} - -// Response for the -// [ListWorkflows][google.cloud.workflows.v1beta.Workflows.ListWorkflows] -// method. -message ListWorkflowsResponse { - // The workflows which match the request. - repeated Workflow workflows = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; - - // Unreachable resources. - repeated string unreachable = 3; -} - -// Request for the -// [GetWorkflow][google.cloud.workflows.v1beta.Workflows.GetWorkflow] method. -message GetWorkflowRequest { - // Required. Name of the workflow which information should be retrieved. - // Format: projects/{project}/locations/{location}/workflows/{workflow} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "workflows.googleapis.com/Workflow" - } - ]; -} - -// Request for the -// [CreateWorkflow][google.cloud.workflows.v1beta.Workflows.CreateWorkflow] -// method. -message CreateWorkflowRequest { - // Required. Project and location in which the workflow should be created. - // Format: projects/{project}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. Workflow to be created. - Workflow workflow = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The ID of the workflow to be created. It has to fulfill the - // following requirements: - // - // * Must contain only letters, numbers, underscores and hyphens. - // * Must start with a letter. - // * Must be between 1-64 characters. - // * Must end with a number or a letter. - // * Must be unique within the customer project and location. - string workflow_id = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the -// [DeleteWorkflow][google.cloud.workflows.v1beta.Workflows.DeleteWorkflow] -// method. -message DeleteWorkflowRequest { - // Required. Name of the workflow to be deleted. - // Format: projects/{project}/locations/{location}/workflows/{workflow} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "workflows.googleapis.com/Workflow" - } - ]; -} - -// Request for the -// [UpdateWorkflow][google.cloud.workflows.v1beta.Workflows.UpdateWorkflow] -// method. -message UpdateWorkflowRequest { - // Required. Workflow to be updated. - Workflow workflow = 1 [(google.api.field_behavior) = REQUIRED]; - - // List of fields to be updated. If not present, the entire workflow - // will be updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Represents the metadata of the long-running operation. -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Server-defined resource path for the target of the operation. - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // API version used to start the operation. - string api_version = 5; -} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 389c7f8d..00000000 --- a/renovate.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "enabled": false, - "extends": [ - ":separateMajorReleases", - ":combinePatchMinorReleases", - ":ignoreUnstable", - ":prImmediately", - ":updateNotScheduled", - ":automergeDisabled", - ":ignoreModulesAndTests", - ":maintainLockFilesDisabled", - ":autodetectPinVersions" - ], - "ignorePaths": [".kokoro/requirements.txt"], - "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-workflows", - "^com.google.cloud:libraries-bom", - "^com.google.cloud.samples:shared-configuration" - ], - "semanticCommitType": "chore", - "semanticCommitScope": "deps" - }, - { - "packagePatterns": [ - "^junit:junit", - "^com.google.truth:truth", - "^org.mockito:mockito-core", - "^org.objenesis:objenesis", - "^com.google.cloud:google-cloud-conformance-tests" - ], - "semanticCommitType": "test", - "semanticCommitScope": "deps" - }, - { - "packagePatterns": [ - "^com.google.cloud:google-cloud-" - ], - "ignoreUnstable": false - }, - { - "packagePatterns": [ - "^com.fasterxml.jackson.core" - ], - "groupName": "jackson dependencies" - } - ], - "semanticCommits": true, - "dependencyDashboard": true -} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml deleted file mode 100644 index 6cf3a612..00000000 --- a/samples/install-without-bom/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - 4.0.0 - com.google.cloud - workflows-install-without-bom - jar - Google Cloud Workflows Install Without Bom - https://github.com/googleapis/java-workflows - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - com.google.cloud - google-cloud-workflows - 2.3.6 - - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add-snippets-source - - add-source - - - - ../snippets/src/main/java - - - - - add-snippets-tests - - add-test-source - - - - ../snippets/src/test/java - - - - - - - - diff --git a/samples/pom.xml b/samples/pom.xml deleted file mode 100644 index f5b390df..00000000 --- a/samples/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-workflows-samples - 0.0.1-SNAPSHOT - pom - Google Cloud Workflows Samples Parent - https://github.com/googleapis/java-workflows - - Java idiomatic client for Google Cloud Platform services. - - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - install-without-bom - snapshot - snippets - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 3.0.0 - - true - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - - true - - - - - diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml deleted file mode 100644 index bff2e61a..00000000 --- a/samples/snapshot/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 4.0.0 - com.google.cloud - workflows-snapshot - jar - Google Cloud Workflows Snapshot Samples - https://github.com/googleapis/java-workflows - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-workflows - 2.3.7-SNAPSHOT - - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add-snippets-source - - add-source - - - - ../snippets/src/main/java - - - - - add-snippets-tests - - add-test-source - - - - ../snippets/src/test/java - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/stub/workflowsstubsettings/getworkflow/SyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/stub/workflowsstubsettings/getworkflow/SyncGetWorkflow.java deleted file mode 100644 index b60bf8a4..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/stub/workflowsstubsettings/getworkflow/SyncGetWorkflow.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.stub.samples; - -// [START workflows_v1_generated_workflowsstubsettings_getworkflow_sync] -import com.google.cloud.workflows.v1.stub.WorkflowsStubSettings; -import java.time.Duration; - -public class SyncGetWorkflow { - - public static void main(String[] args) throws Exception { - syncGetWorkflow(); - } - - public static void syncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsStubSettings.Builder workflowsSettingsBuilder = WorkflowsStubSettings.newBuilder(); - workflowsSettingsBuilder - .getWorkflowSettings() - .setRetrySettings( - workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - WorkflowsStubSettings workflowsSettings = workflowsSettingsBuilder.build(); - } -} -// [END workflows_v1_generated_workflowsstubsettings_getworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 9f0498da..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.cloud.workflows.v1.WorkflowsSettings; -import com.google.cloud.workflows.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings workflowsSettings = - WorkflowsSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings); - } -} -// [END workflows_v1_generated_workflowsclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 70c70e81..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_create_setcredentialsprovider1_sync] -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.cloud.workflows.v1.WorkflowsSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings workflowsSettings = - WorkflowsSettings.newBuilder() - .setTransportChannelProvider( - WorkflowsSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings); - } -} -// [END workflows_v1_generated_workflowsclient_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 23142b0a..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_create_setendpoint_sync] -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.cloud.workflows.v1.WorkflowsSettings; -import com.google.cloud.workflows.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings workflowsSettings = - WorkflowsSettings.newBuilder().setEndpoint(myEndpoint).build(); - WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings); - } -} -// [END workflows_v1_generated_workflowsclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/AsyncCreateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/AsyncCreateWorkflow.java deleted file mode 100644 index 22bdee38..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/AsyncCreateWorkflow.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_createworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.longrunning.Operation; - -public class AsyncCreateWorkflow { - - public static void main(String[] args) throws Exception { - asyncCreateWorkflow(); - } - - public static void asyncCreateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setWorkflow(Workflow.newBuilder().build()) - .setWorkflowId("workflowId-360387270") - .build(); - ApiFuture future = workflowsClient.createWorkflowCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_createworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/AsyncCreateWorkflowLRO.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/AsyncCreateWorkflowLRO.java deleted file mode 100644 index db6a663e..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/AsyncCreateWorkflowLRO.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_createworkflow_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class AsyncCreateWorkflowLRO { - - public static void main(String[] args) throws Exception { - asyncCreateWorkflowLRO(); - } - - public static void asyncCreateWorkflowLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setWorkflow(Workflow.newBuilder().build()) - .setWorkflowId("workflowId-360387270") - .build(); - OperationFuture future = - workflowsClient.createWorkflowOperationCallable().futureCall(request); - // Do something. - Workflow response = future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_createworkflow_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflow.java deleted file mode 100644 index 12d29d17..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflow.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_createworkflow_sync] -import com.google.cloud.workflows.v1.CreateWorkflowRequest; -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncCreateWorkflow { - - public static void main(String[] args) throws Exception { - syncCreateWorkflow(); - } - - public static void syncCreateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setWorkflow(Workflow.newBuilder().build()) - .setWorkflowId("workflowId-360387270") - .build(); - Workflow response = workflowsClient.createWorkflowAsync(request).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_createworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflowLocationnameWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflowLocationnameWorkflowString.java deleted file mode 100644 index 77731cc2..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflowLocationnameWorkflowString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_createworkflow_locationnameworkflowstring_sync] -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncCreateWorkflowLocationnameWorkflowString { - - public static void main(String[] args) throws Exception { - syncCreateWorkflowLocationnameWorkflowString(); - } - - public static void syncCreateWorkflowLocationnameWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_createworkflow_locationnameworkflowstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflowStringWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflowStringWorkflowString.java deleted file mode 100644 index 64de93b0..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/createworkflow/SyncCreateWorkflowStringWorkflowString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_createworkflow_stringworkflowstring_sync] -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncCreateWorkflowStringWorkflowString { - - public static void main(String[] args) throws Exception { - syncCreateWorkflowStringWorkflowString(); - } - - public static void syncCreateWorkflowStringWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_createworkflow_stringworkflowstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/AsyncDeleteWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/AsyncDeleteWorkflow.java deleted file mode 100644 index 1bbcfce8..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/AsyncDeleteWorkflow.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_deleteworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.longrunning.Operation; - -public class AsyncDeleteWorkflow { - - public static void main(String[] args) throws Exception { - asyncDeleteWorkflow(); - } - - public static void asyncDeleteWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - ApiFuture future = workflowsClient.deleteWorkflowCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_deleteworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/AsyncDeleteWorkflowLRO.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/AsyncDeleteWorkflowLRO.java deleted file mode 100644 index c946e250..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/AsyncDeleteWorkflowLRO.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_deleteworkflow_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteWorkflowLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteWorkflowLRO(); - } - - public static void asyncDeleteWorkflowLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - OperationFuture future = - workflowsClient.deleteWorkflowOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_deleteworkflow_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflow.java deleted file mode 100644 index 57515f17..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflow.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_deleteworkflow_sync] -import com.google.cloud.workflows.v1.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.Empty; - -public class SyncDeleteWorkflow { - - public static void main(String[] args) throws Exception { - syncDeleteWorkflow(); - } - - public static void syncDeleteWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - workflowsClient.deleteWorkflowAsync(request).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_deleteworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflowString.java deleted file mode 100644 index d6df6053..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflowString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_deleteworkflow_string_sync] -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.Empty; - -public class SyncDeleteWorkflowString { - - public static void main(String[] args) throws Exception { - syncDeleteWorkflowString(); - } - - public static void syncDeleteWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString(); - workflowsClient.deleteWorkflowAsync(name).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_deleteworkflow_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflowWorkflowname.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflowWorkflowname.java deleted file mode 100644 index b68fbc49..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/deleteworkflow/SyncDeleteWorkflowWorkflowname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_deleteworkflow_workflowname_sync] -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.Empty; - -public class SyncDeleteWorkflowWorkflowname { - - public static void main(String[] args) throws Exception { - syncDeleteWorkflowWorkflowname(); - } - - public static void syncDeleteWorkflowWorkflowname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - workflowsClient.deleteWorkflowAsync(name).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_deleteworkflow_workflowname_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/AsyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/AsyncGetWorkflow.java deleted file mode 100644 index 27fe62e7..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/AsyncGetWorkflow.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_getworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1.GetWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class AsyncGetWorkflow { - - public static void main(String[] args) throws Exception { - asyncGetWorkflow(); - } - - public static void asyncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - GetWorkflowRequest request = - GetWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - ApiFuture future = workflowsClient.getWorkflowCallable().futureCall(request); - // Do something. - Workflow response = future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_getworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflow.java deleted file mode 100644 index b81d5ceb..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflow.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_getworkflow_sync] -import com.google.cloud.workflows.v1.GetWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncGetWorkflow { - - public static void main(String[] args) throws Exception { - syncGetWorkflow(); - } - - public static void syncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - GetWorkflowRequest request = - GetWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - Workflow response = workflowsClient.getWorkflow(request); - } - } -} -// [END workflows_v1_generated_workflowsclient_getworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflowString.java deleted file mode 100644 index b326b547..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflowString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_getworkflow_string_sync] -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncGetWorkflowString { - - public static void main(String[] args) throws Exception { - syncGetWorkflowString(); - } - - public static void syncGetWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString(); - Workflow response = workflowsClient.getWorkflow(name); - } - } -} -// [END workflows_v1_generated_workflowsclient_getworkflow_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflowWorkflowname.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflowWorkflowname.java deleted file mode 100644 index 6548fd1c..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/getworkflow/SyncGetWorkflowWorkflowname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_getworkflow_workflowname_sync] -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowName; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncGetWorkflowWorkflowname { - - public static void main(String[] args) throws Exception { - syncGetWorkflowWorkflowname(); - } - - public static void syncGetWorkflowWorkflowname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - Workflow response = workflowsClient.getWorkflow(name); - } - } -} -// [END workflows_v1_generated_workflowsclient_getworkflow_workflowname_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/AsyncListWorkflows.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/AsyncListWorkflows.java deleted file mode 100644 index f6174524..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/AsyncListWorkflows.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_listworkflows_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class AsyncListWorkflows { - - public static void main(String[] args) throws Exception { - asyncListWorkflows(); - } - - public static void asyncListWorkflows() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .build(); - ApiFuture future = workflowsClient.listWorkflowsPagedCallable().futureCall(request); - // Do something. - for (Workflow element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1_generated_workflowsclient_listworkflows_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/AsyncListWorkflowsPaged.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/AsyncListWorkflowsPaged.java deleted file mode 100644 index 0e0923e7..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/AsyncListWorkflowsPaged.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_listworkflows_paged_async] -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.ListWorkflowsResponse; -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.common.base.Strings; - -public class AsyncListWorkflowsPaged { - - public static void main(String[] args) throws Exception { - asyncListWorkflowsPaged(); - } - - public static void asyncListWorkflowsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .build(); - while (true) { - ListWorkflowsResponse response = workflowsClient.listWorkflowsCallable().call(request); - for (Workflow element : response.getWorkflowsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END workflows_v1_generated_workflowsclient_listworkflows_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflows.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflows.java deleted file mode 100644 index dc7aae84..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflows.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_listworkflows_sync] -import com.google.cloud.workflows.v1.ListWorkflowsRequest; -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncListWorkflows { - - public static void main(String[] args) throws Exception { - syncListWorkflows(); - } - - public static void syncListWorkflows() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .build(); - for (Workflow element : workflowsClient.listWorkflows(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1_generated_workflowsclient_listworkflows_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflowsLocationname.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflowsLocationname.java deleted file mode 100644 index c97b770f..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflowsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_listworkflows_locationname_sync] -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncListWorkflowsLocationname { - - public static void main(String[] args) throws Exception { - syncListWorkflowsLocationname(); - } - - public static void syncListWorkflowsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1_generated_workflowsclient_listworkflows_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflowsString.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflowsString.java deleted file mode 100644 index b6e363df..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/listworkflows/SyncListWorkflowsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_listworkflows_string_sync] -import com.google.cloud.workflows.v1.LocationName; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; - -public class SyncListWorkflowsString { - - public static void main(String[] args) throws Exception { - syncListWorkflowsString(); - } - - public static void syncListWorkflowsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1_generated_workflowsclient_listworkflows_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/AsyncUpdateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/AsyncUpdateWorkflow.java deleted file mode 100644 index b7b7009e..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/AsyncUpdateWorkflow.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_updateworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.longrunning.Operation; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateWorkflow { - - public static void main(String[] args) throws Exception { - asyncUpdateWorkflow(); - } - - public static void asyncUpdateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder() - .setWorkflow(Workflow.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = workflowsClient.updateWorkflowCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_updateworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/AsyncUpdateWorkflowLRO.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/AsyncUpdateWorkflowLRO.java deleted file mode 100644 index cc2f6111..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/AsyncUpdateWorkflowLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_updateworkflow_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.workflows.v1.OperationMetadata; -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateWorkflowLRO { - - public static void main(String[] args) throws Exception { - asyncUpdateWorkflowLRO(); - } - - public static void asyncUpdateWorkflowLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder() - .setWorkflow(Workflow.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - OperationFuture future = - workflowsClient.updateWorkflowOperationCallable().futureCall(request); - // Do something. - Workflow response = future.get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_updateworkflow_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/SyncUpdateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/SyncUpdateWorkflow.java deleted file mode 100644 index 3e6942c2..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/SyncUpdateWorkflow.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_updateworkflow_sync] -import com.google.cloud.workflows.v1.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateWorkflow { - - public static void main(String[] args) throws Exception { - syncUpdateWorkflow(); - } - - public static void syncUpdateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder() - .setWorkflow(Workflow.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Workflow response = workflowsClient.updateWorkflowAsync(request).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_updateworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/SyncUpdateWorkflowWorkflowFieldmask.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/SyncUpdateWorkflowWorkflowFieldmask.java deleted file mode 100644 index 83811298..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowsclient/updateworkflow/SyncUpdateWorkflowWorkflowFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowsclient_updateworkflow_workflowfieldmask_sync] -import com.google.cloud.workflows.v1.Workflow; -import com.google.cloud.workflows.v1.WorkflowsClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateWorkflowWorkflowFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateWorkflowWorkflowFieldmask(); - } - - public static void syncUpdateWorkflowWorkflowFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - Workflow workflow = Workflow.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Workflow response = workflowsClient.updateWorkflowAsync(workflow, updateMask).get(); - } - } -} -// [END workflows_v1_generated_workflowsclient_updateworkflow_workflowfieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowssettings/getworkflow/SyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1/workflowssettings/getworkflow/SyncGetWorkflow.java deleted file mode 100644 index 7ab8e3fe..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1/workflowssettings/getworkflow/SyncGetWorkflow.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1.samples; - -// [START workflows_v1_generated_workflowssettings_getworkflow_sync] -import com.google.cloud.workflows.v1.WorkflowsSettings; -import java.time.Duration; - -public class SyncGetWorkflow { - - public static void main(String[] args) throws Exception { - syncGetWorkflow(); - } - - public static void syncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings.Builder workflowsSettingsBuilder = WorkflowsSettings.newBuilder(); - workflowsSettingsBuilder - .getWorkflowSettings() - .setRetrySettings( - workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - WorkflowsSettings workflowsSettings = workflowsSettingsBuilder.build(); - } -} -// [END workflows_v1_generated_workflowssettings_getworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/stub/workflowsstubsettings/getworkflow/SyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/stub/workflowsstubsettings/getworkflow/SyncGetWorkflow.java deleted file mode 100644 index aeeabfab..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/stub/workflowsstubsettings/getworkflow/SyncGetWorkflow.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.stub.samples; - -// [START workflows_v1beta_generated_workflowsstubsettings_getworkflow_sync] -import com.google.cloud.workflows.v1beta.stub.WorkflowsStubSettings; -import java.time.Duration; - -public class SyncGetWorkflow { - - public static void main(String[] args) throws Exception { - syncGetWorkflow(); - } - - public static void syncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsStubSettings.Builder workflowsSettingsBuilder = WorkflowsStubSettings.newBuilder(); - workflowsSettingsBuilder - .getWorkflowSettings() - .setRetrySettings( - workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - WorkflowsStubSettings workflowsSettings = workflowsSettingsBuilder.build(); - } -} -// [END workflows_v1beta_generated_workflowsstubsettings_getworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 701431e0..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_create_setcredentialsprovider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.cloud.workflows.v1beta.WorkflowsSettings; -import com.google.cloud.workflows.v1beta.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings workflowsSettings = - WorkflowsSettings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings); - } -} -// [END workflows_v1beta_generated_workflowsclient_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index ac0ae104..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_create_setcredentialsprovider1_sync] -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.cloud.workflows.v1beta.WorkflowsSettings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings workflowsSettings = - WorkflowsSettings.newBuilder() - .setTransportChannelProvider( - WorkflowsSettings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); - WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings); - } -} -// [END workflows_v1beta_generated_workflowsclient_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetEndpoint.java deleted file mode 100644 index a9aef20f..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_create_setendpoint_sync] -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.cloud.workflows.v1beta.WorkflowsSettings; -import com.google.cloud.workflows.v1beta.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings workflowsSettings = - WorkflowsSettings.newBuilder().setEndpoint(myEndpoint).build(); - WorkflowsClient workflowsClient = WorkflowsClient.create(workflowsSettings); - } -} -// [END workflows_v1beta_generated_workflowsclient_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/AsyncCreateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/AsyncCreateWorkflow.java deleted file mode 100644 index e389eebc..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/AsyncCreateWorkflow.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_createworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.longrunning.Operation; - -public class AsyncCreateWorkflow { - - public static void main(String[] args) throws Exception { - asyncCreateWorkflow(); - } - - public static void asyncCreateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setWorkflow(Workflow.newBuilder().build()) - .setWorkflowId("workflowId-360387270") - .build(); - ApiFuture future = workflowsClient.createWorkflowCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_createworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/AsyncCreateWorkflowLRO.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/AsyncCreateWorkflowLRO.java deleted file mode 100644 index 869d3578..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/AsyncCreateWorkflowLRO.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_createworkflow_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class AsyncCreateWorkflowLRO { - - public static void main(String[] args) throws Exception { - asyncCreateWorkflowLRO(); - } - - public static void asyncCreateWorkflowLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setWorkflow(Workflow.newBuilder().build()) - .setWorkflowId("workflowId-360387270") - .build(); - OperationFuture future = - workflowsClient.createWorkflowOperationCallable().futureCall(request); - // Do something. - Workflow response = future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_createworkflow_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflow.java deleted file mode 100644 index 2db5b9cf..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflow.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_createworkflow_sync] -import com.google.cloud.workflows.v1beta.CreateWorkflowRequest; -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncCreateWorkflow { - - public static void main(String[] args) throws Exception { - syncCreateWorkflow(); - } - - public static void syncCreateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - CreateWorkflowRequest request = - CreateWorkflowRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setWorkflow(Workflow.newBuilder().build()) - .setWorkflowId("workflowId-360387270") - .build(); - Workflow response = workflowsClient.createWorkflowAsync(request).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_createworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflowLocationnameWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflowLocationnameWorkflowString.java deleted file mode 100644 index f5400e66..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflowLocationnameWorkflowString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_createworkflow_locationnameworkflowstring_sync] -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncCreateWorkflowLocationnameWorkflowString { - - public static void main(String[] args) throws Exception { - syncCreateWorkflowLocationnameWorkflowString(); - } - - public static void syncCreateWorkflowLocationnameWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_createworkflow_locationnameworkflowstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflowStringWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflowStringWorkflowString.java deleted file mode 100644 index a9d16074..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/createworkflow/SyncCreateWorkflowStringWorkflowString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_createworkflow_stringworkflowstring_sync] -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncCreateWorkflowStringWorkflowString { - - public static void main(String[] args) throws Exception { - syncCreateWorkflowStringWorkflowString(); - } - - public static void syncCreateWorkflowStringWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - Workflow workflow = Workflow.newBuilder().build(); - String workflowId = "workflowId-360387270"; - Workflow response = workflowsClient.createWorkflowAsync(parent, workflow, workflowId).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_createworkflow_stringworkflowstring_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/AsyncDeleteWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/AsyncDeleteWorkflow.java deleted file mode 100644 index b754a6e4..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/AsyncDeleteWorkflow.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_deleteworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.longrunning.Operation; - -public class AsyncDeleteWorkflow { - - public static void main(String[] args) throws Exception { - asyncDeleteWorkflow(); - } - - public static void asyncDeleteWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - ApiFuture future = workflowsClient.deleteWorkflowCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_deleteworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/AsyncDeleteWorkflowLRO.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/AsyncDeleteWorkflowLRO.java deleted file mode 100644 index 41202c2f..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/AsyncDeleteWorkflowLRO.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_deleteworkflow_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.Empty; - -public class AsyncDeleteWorkflowLRO { - - public static void main(String[] args) throws Exception { - asyncDeleteWorkflowLRO(); - } - - public static void asyncDeleteWorkflowLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - OperationFuture future = - workflowsClient.deleteWorkflowOperationCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_deleteworkflow_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflow.java deleted file mode 100644 index 936db9a5..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflow.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_deleteworkflow_sync] -import com.google.cloud.workflows.v1beta.DeleteWorkflowRequest; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.Empty; - -public class SyncDeleteWorkflow { - - public static void main(String[] args) throws Exception { - syncDeleteWorkflow(); - } - - public static void syncDeleteWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - DeleteWorkflowRequest request = - DeleteWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - workflowsClient.deleteWorkflowAsync(request).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_deleteworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflowString.java deleted file mode 100644 index 8d87fa42..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflowString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_deleteworkflow_string_sync] -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.Empty; - -public class SyncDeleteWorkflowString { - - public static void main(String[] args) throws Exception { - syncDeleteWorkflowString(); - } - - public static void syncDeleteWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString(); - workflowsClient.deleteWorkflowAsync(name).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_deleteworkflow_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflowWorkflowname.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflowWorkflowname.java deleted file mode 100644 index a3c78382..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/deleteworkflow/SyncDeleteWorkflowWorkflowname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_deleteworkflow_workflowname_sync] -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.Empty; - -public class SyncDeleteWorkflowWorkflowname { - - public static void main(String[] args) throws Exception { - syncDeleteWorkflowWorkflowname(); - } - - public static void syncDeleteWorkflowWorkflowname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - workflowsClient.deleteWorkflowAsync(name).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_deleteworkflow_workflowname_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/AsyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/AsyncGetWorkflow.java deleted file mode 100644 index 90f82fb3..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/AsyncGetWorkflow.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_getworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1beta.GetWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class AsyncGetWorkflow { - - public static void main(String[] args) throws Exception { - asyncGetWorkflow(); - } - - public static void asyncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - GetWorkflowRequest request = - GetWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - ApiFuture future = workflowsClient.getWorkflowCallable().futureCall(request); - // Do something. - Workflow response = future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_getworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflow.java deleted file mode 100644 index ed8a4ce6..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflow.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_getworkflow_sync] -import com.google.cloud.workflows.v1beta.GetWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncGetWorkflow { - - public static void main(String[] args) throws Exception { - syncGetWorkflow(); - } - - public static void syncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - GetWorkflowRequest request = - GetWorkflowRequest.newBuilder() - .setName(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString()) - .build(); - Workflow response = workflowsClient.getWorkflow(request); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_getworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflowString.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflowString.java deleted file mode 100644 index 35578ca6..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflowString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_getworkflow_string_sync] -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncGetWorkflowString { - - public static void main(String[] args) throws Exception { - syncGetWorkflowString(); - } - - public static void syncGetWorkflowString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString(); - Workflow response = workflowsClient.getWorkflow(name); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_getworkflow_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflowWorkflowname.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflowWorkflowname.java deleted file mode 100644 index 5f5028ee..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/getworkflow/SyncGetWorkflowWorkflowname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_getworkflow_workflowname_sync] -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowName; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncGetWorkflowWorkflowname { - - public static void main(String[] args) throws Exception { - syncGetWorkflowWorkflowname(); - } - - public static void syncGetWorkflowWorkflowname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); - Workflow response = workflowsClient.getWorkflow(name); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_getworkflow_workflowname_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/AsyncListWorkflows.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/AsyncListWorkflows.java deleted file mode 100644 index aa87605e..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/AsyncListWorkflows.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_listworkflows_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class AsyncListWorkflows { - - public static void main(String[] args) throws Exception { - asyncListWorkflows(); - } - - public static void asyncListWorkflows() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .build(); - ApiFuture future = workflowsClient.listWorkflowsPagedCallable().futureCall(request); - // Do something. - for (Workflow element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1beta_generated_workflowsclient_listworkflows_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/AsyncListWorkflowsPaged.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/AsyncListWorkflowsPaged.java deleted file mode 100644 index b9116dfa..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/AsyncListWorkflowsPaged.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_listworkflows_paged_async] -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.ListWorkflowsResponse; -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.common.base.Strings; - -public class AsyncListWorkflowsPaged { - - public static void main(String[] args) throws Exception { - asyncListWorkflowsPaged(); - } - - public static void asyncListWorkflowsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .build(); - while (true) { - ListWorkflowsResponse response = workflowsClient.listWorkflowsCallable().call(request); - for (Workflow element : response.getWorkflowsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END workflows_v1beta_generated_workflowsclient_listworkflows_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflows.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflows.java deleted file mode 100644 index cef99211..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflows.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_listworkflows_sync] -import com.google.cloud.workflows.v1beta.ListWorkflowsRequest; -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncListWorkflows { - - public static void main(String[] args) throws Exception { - syncListWorkflows(); - } - - public static void syncListWorkflows() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - ListWorkflowsRequest request = - ListWorkflowsRequest.newBuilder() - .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .setFilter("filter-1274492040") - .setOrderBy("orderBy-1207110587") - .build(); - for (Workflow element : workflowsClient.listWorkflows(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1beta_generated_workflowsclient_listworkflows_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflowsLocationname.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflowsLocationname.java deleted file mode 100644 index a50a23c9..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflowsLocationname.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_listworkflows_locationname_sync] -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncListWorkflowsLocationname { - - public static void main(String[] args) throws Exception { - syncListWorkflowsLocationname(); - } - - public static void syncListWorkflowsLocationname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1beta_generated_workflowsclient_listworkflows_locationname_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflowsString.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflowsString.java deleted file mode 100644 index 6ce7afe2..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/listworkflows/SyncListWorkflowsString.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_listworkflows_string_sync] -import com.google.cloud.workflows.v1beta.LocationName; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; - -public class SyncListWorkflowsString { - - public static void main(String[] args) throws Exception { - syncListWorkflowsString(); - } - - public static void syncListWorkflowsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); - for (Workflow element : workflowsClient.listWorkflows(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END workflows_v1beta_generated_workflowsclient_listworkflows_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/AsyncUpdateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/AsyncUpdateWorkflow.java deleted file mode 100644 index a5b9b471..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/AsyncUpdateWorkflow.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_updateworkflow_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.longrunning.Operation; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateWorkflow { - - public static void main(String[] args) throws Exception { - asyncUpdateWorkflow(); - } - - public static void asyncUpdateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder() - .setWorkflow(Workflow.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - ApiFuture future = workflowsClient.updateWorkflowCallable().futureCall(request); - // Do something. - Operation response = future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_updateworkflow_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/AsyncUpdateWorkflowLRO.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/AsyncUpdateWorkflowLRO.java deleted file mode 100644 index 3d7d28e9..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/AsyncUpdateWorkflowLRO.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_updateworkflow_lro_async] -import com.google.api.gax.longrunning.OperationFuture; -import com.google.cloud.workflows.v1beta.OperationMetadata; -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.FieldMask; - -public class AsyncUpdateWorkflowLRO { - - public static void main(String[] args) throws Exception { - asyncUpdateWorkflowLRO(); - } - - public static void asyncUpdateWorkflowLRO() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder() - .setWorkflow(Workflow.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - OperationFuture future = - workflowsClient.updateWorkflowOperationCallable().futureCall(request); - // Do something. - Workflow response = future.get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_updateworkflow_lro_async] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/SyncUpdateWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/SyncUpdateWorkflow.java deleted file mode 100644 index 4b891946..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/SyncUpdateWorkflow.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_updateworkflow_sync] -import com.google.cloud.workflows.v1beta.UpdateWorkflowRequest; -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateWorkflow { - - public static void main(String[] args) throws Exception { - syncUpdateWorkflow(); - } - - public static void syncUpdateWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - UpdateWorkflowRequest request = - UpdateWorkflowRequest.newBuilder() - .setWorkflow(Workflow.newBuilder().build()) - .setUpdateMask(FieldMask.newBuilder().build()) - .build(); - Workflow response = workflowsClient.updateWorkflowAsync(request).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_updateworkflow_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/SyncUpdateWorkflowWorkflowFieldmask.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/SyncUpdateWorkflowWorkflowFieldmask.java deleted file mode 100644 index 03a52076..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowsclient/updateworkflow/SyncUpdateWorkflowWorkflowFieldmask.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowsclient_updateworkflow_workflowfieldmask_sync] -import com.google.cloud.workflows.v1beta.Workflow; -import com.google.cloud.workflows.v1beta.WorkflowsClient; -import com.google.protobuf.FieldMask; - -public class SyncUpdateWorkflowWorkflowFieldmask { - - public static void main(String[] args) throws Exception { - syncUpdateWorkflowWorkflowFieldmask(); - } - - public static void syncUpdateWorkflowWorkflowFieldmask() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (WorkflowsClient workflowsClient = WorkflowsClient.create()) { - Workflow workflow = Workflow.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - Workflow response = workflowsClient.updateWorkflowAsync(workflow, updateMask).get(); - } - } -} -// [END workflows_v1beta_generated_workflowsclient_updateworkflow_workflowfieldmask_sync] diff --git a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowssettings/getworkflow/SyncGetWorkflow.java b/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowssettings/getworkflow/SyncGetWorkflow.java deleted file mode 100644 index 48f72055..00000000 --- a/samples/snippets/generated/com/google/cloud/workflows/v1beta/workflowssettings/getworkflow/SyncGetWorkflow.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.workflows.v1beta.samples; - -// [START workflows_v1beta_generated_workflowssettings_getworkflow_sync] -import com.google.cloud.workflows.v1beta.WorkflowsSettings; -import java.time.Duration; - -public class SyncGetWorkflow { - - public static void main(String[] args) throws Exception { - syncGetWorkflow(); - } - - public static void syncGetWorkflow() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - WorkflowsSettings.Builder workflowsSettingsBuilder = WorkflowsSettings.newBuilder(); - workflowsSettingsBuilder - .getWorkflowSettings() - .setRetrySettings( - workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - WorkflowsSettings workflowsSettings = workflowsSettingsBuilder.build(); - } -} -// [END workflows_v1beta_generated_workflowssettings_getworkflow_sync] diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml deleted file mode 100644 index bddd9e3a..00000000 --- a/samples/snippets/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - com.google.cloud - workflows-snippets - jar - Google Cloud Workflows Snippets - https://github.com/googleapis/java-workflows - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-workflows - 2.3.6 - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - diff --git a/synth.metadata b/synth.metadata deleted file mode 100644 index 2589f9c4..00000000 --- a/synth.metadata +++ /dev/null @@ -1,145 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/java-workflows.git", - "sha": "24ce2a38d23b772adb5de150d6df4e9160545bd4" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1305ca41d554eb0725237561e34129373bb8cbc1", - "internalRef": "362856902" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8285c2b4cdbc3771d031ad91e1c4ec9e55fff45d" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "workflows", - "apiVersion": "v1beta", - "language": "java", - "generator": "bazel" - } - } - ], - "generatedFiles": [ - ".github/CODEOWNERS", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/blunderbuss.yml", - ".github/generated-files-bot.yml", - ".github/readme/synth.py", - ".github/release-please.yml", - ".github/snippet-bot.yml", - ".github/sync-repo-settings.yaml", - ".github/trusted-contribution.yml", - ".github/workflows/approve-readme.yaml", - ".github/workflows/auto-release.yaml", - ".github/workflows/ci.yaml", - ".github/workflows/samples.yaml", - ".kokoro/build.bat", - ".kokoro/build.sh", - ".kokoro/coerce_logs.sh", - ".kokoro/common.cfg", - ".kokoro/common.sh", - ".kokoro/continuous/common.cfg", - ".kokoro/continuous/java8.cfg", - ".kokoro/continuous/readme.cfg", - ".kokoro/dependencies.sh", - ".kokoro/nightly/common.cfg", - ".kokoro/nightly/integration.cfg", - ".kokoro/nightly/java11.cfg", - ".kokoro/nightly/java7.cfg", - ".kokoro/nightly/java8-osx.cfg", - ".kokoro/nightly/java8-win.cfg", - ".kokoro/nightly/java8.cfg", - ".kokoro/nightly/samples.cfg", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/clirr.cfg", - ".kokoro/presubmit/common.cfg", - ".kokoro/presubmit/dependencies.cfg", - ".kokoro/presubmit/integration.cfg", - ".kokoro/presubmit/java11.cfg", - ".kokoro/presubmit/java7.cfg", - ".kokoro/presubmit/java8-osx.cfg", - ".kokoro/presubmit/java8-win.cfg", - ".kokoro/presubmit/java8.cfg", - ".kokoro/presubmit/linkage-monitor.cfg", - ".kokoro/presubmit/lint.cfg", - ".kokoro/presubmit/samples.cfg", - ".kokoro/readme.sh", - ".kokoro/release/bump_snapshot.cfg", - ".kokoro/release/common.cfg", - ".kokoro/release/common.sh", - ".kokoro/release/drop.cfg", - ".kokoro/release/drop.sh", - ".kokoro/release/promote.cfg", - ".kokoro/release/promote.sh", - ".kokoro/release/publish_javadoc.cfg", - ".kokoro/release/publish_javadoc.sh", - ".kokoro/release/publish_javadoc11.cfg", - ".kokoro/release/publish_javadoc11.sh", - ".kokoro/release/snapshot.cfg", - ".kokoro/release/snapshot.sh", - ".kokoro/release/stage.cfg", - ".kokoro/release/stage.sh", - ".kokoro/trampoline.sh", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "codecov.yaml", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsClient.java", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsSettings.java", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/gapic_metadata.json", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/package-info.java", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsCallableFactory.java", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsStub.java", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStub.java", - "google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/WorkflowsStubSettings.java", - "google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflows.java", - "google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/MockWorkflowsImpl.java", - "google-cloud-workflows/src/test/java/com/google/cloud/workflows/v1beta/WorkflowsClientTest.java", - "grpc-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsGrpc.java", - "java.header", - "license-checks.xml", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequest.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/CreateWorkflowRequestOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequest.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/DeleteWorkflowRequestOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequest.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/GetWorkflowRequestOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequest.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsRequestOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponse.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/ListWorkflowsResponseOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/LocationName.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadata.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/OperationMetadataOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequest.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/UpdateWorkflowRequestOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/Workflow.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowName.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowOrBuilder.java", - "proto-google-cloud-workflows-v1beta/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsProto.java", - "proto-google-cloud-workflows-v1beta/src/main/proto/google/cloud/workflows/v1beta/workflows.proto", - "renovate.json", - "samples/install-without-bom/pom.xml", - "samples/pom.xml", - "samples/snapshot/pom.xml", - "samples/snippets/pom.xml" - ] -} \ No newline at end of file diff --git a/versions.txt b/versions.txt deleted file mode 100644 index 68f13eed..00000000 --- a/versions.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Format: -# module:released-version:current-version - -google-cloud-workflows:2.3.6:2.3.7-SNAPSHOT -grpc-google-cloud-workflows-v1beta:0.9.6:0.9.7-SNAPSHOT -grpc-google-cloud-workflows-v1:2.3.6:2.3.7-SNAPSHOT -proto-google-cloud-workflows-v1beta:0.9.6:0.9.7-SNAPSHOT -proto-google-cloud-workflows-v1:2.3.6:2.3.7-SNAPSHOT